JQ学习
mepal
这个作者很懒,什么都没留下…
展开
-
JQuery防止退格键网页后退
JQuery防止退格键网页后退 $(document).keydown(function (e) { var doPrevent; if (e.keyCode == 8) { var d = e.srcElement || e.target; if (d.tagName.toUpperCase() == 'INPUT' || d.tagName.t转载 2014-08-07 08:41:10 · 285 阅读 · 0 评论 -
jq select操作全集
添加option $("#ID option").each(function(){ if($(this).val()==111){ $(this).remove(); } }); 移除option $("UPS Ground").appendTo($("#ID")); 取得下拉选单的选取值 $("#testSelect option:selected"转载 2014-11-22 13:54:30 · 223 阅读 · 0 评论 -
JQ操作select项
jQuery获取Select元素,并选择的Text和Value: 1. $("#select_id").change(function(){//code...}); //为Select添加事件,当选择其中一项时触发 2. var checkText=$("#select_id").find("option:selected").text(); //获取Select选择的Text转载 2014-11-22 13:44:34 · 178 阅读 · 0 评论