我有这样的代码:变化值
$(document).ready(function() {
$('#textarea2').click(function() {
$("textarea").html('<input type="text" value="hello">');
});
});
<script src="http://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<button id="textarea2">Click here</button>
<input type="text" class="form-name" value="Name">
<input type="text" class="form-email" value="E-mail">
<input type="text" class="form-phone" id="textarea">
我会改变最后一排用不同的值..
我按一下按钮,但我的代码不起作用。也许这是jQuery的问题
你的选择是不是对corrrect ## $( “selecor”)##,你需要提前使用VAL,而不是HTML的 –