- 功能: 获得匹配元素的当前值。
获取文本框中的值
$("input").val();
设定文本框的值
$("input").val("hello world!");
设定文本框的值
$('input:text.items').val(function() {
return this.value + ' ' + this.className;
});
获取文本框中的值
$("input").val();
设定文本框的值
$("input").val("hello world!");
设定文本框的值
$('input:text.items').val(function() {
return this.value + ' ' + this.className;
});