<script>
$(document).ready(function(){
$('.next').click(function(){
$('input#productname').val($('input#_productname').val());
$('textarea#description').val($('textarea#_description').val());
});
});
</script>
<input type="text" name="_productname" id="_productname" value="demo"/>
<textarea name="_description" id="_description" value="demo" ></textarea>
<input type="text" name="productname" id="productname" />
<textarea name="description" id="description" ></textarea>
<input id="next" class="next" type="submit" name="next" value="next" />
output:
productname = demo
description =
Help me get value this tag texterea
Textareas do not have a value attribute documentation (so do not use one). You have to put the value between the opening and closing tag
<textarea> value here </textarea>and also id’s cannot start with
_documentaion so change that too, and it should work.html
javascript
demo at http://jsfiddle.net/gaby/Fmxyd/