当附加到div时,我得到的输入框值未定义。 以下是代码。未定义的输入框值
JS:
$('#submitHook').click(function() {
var v = ('#try').val();
alert(v);
$('#container').prepend('<tr><td>' + v + '</td></tr>');
});
HTML:
<code>
<input type="text" id="try"></input>
<input type="button" id="submitHook"></input>
<table id="container></table>
</code>
又怎么能同被exteneded到textarea的? 感谢任何帮助。
的HTML应该是空白的? – Vadiklk 2011-05-25 10:45:51
你可以告诉我们的HTML – koool 2011-05-25 10:47:17