我的功能需要帮助。我不知道如何将正确的文本设置为val()函数 我有表格,我在那里写文字,我想通过val
<form>
<input type="text" id="formValueId" name="valueId"/>
<input type="button" id="theButton" value="Send"/>
</form>
这是javascript:
var button = document.getElementById("theButton"),
value = button.form.valueId.value;
button.onclick = function() {
$("#modal").fadeOut(400, function() {
$("#bg").fadeOut(400, function() {
$theTarget.val("My inserted text should be here"); //Before here were (value)
});
});
}
它的继续 - jQuery selector - inserting value only to selected id 感谢