
select下拉列表onChange事件之JQuery实现:
JQuery:
HTML:
输出
alert($(this).val());
});
$("#chk1").attr("checked",'');//不打勾
$("#chk2").attr("checked",true);//打勾
if($("#chk1").attr('checked')==undefined) //判断是否已经打勾
//4.jquery对text的基本操作
$("#txt").attr("value"); //文本框,文本区域:
$("#txt").attr("value",''); //清空内容
$("#txt").attr("value",'11');//填充内容