摘要: jQuery获取Radio选择的Value值 $("input[name='radio_name'][checked]").val(); //选择被选中Radio的Value值 $("#text_id").focus(function(){//code...}); //事件 当对象text_id获取焦点时触发 $("#text_id").blur(function(){//code...}); //事件 当对象text_id失去焦点时触发 $("#text_id").select(); //使文本框 阅读全文
posted @ 2013-01-04 23:45 ishibin 阅读(223) 评论(0) 推荐(0) 编辑
摘要: 参考http://kb.cnblogs.com/page/52290/4/10.使用jQuery链来限定选择器,让你的代码更简洁更优雅 由于JavaScript支持链结构而且支持断行,所以你的代码可以写成下面这样,这个例子先在元素上移除一个class然后在同一个元素上添加另一个class:$('#shopping_cart_items input.in_stock') .removeClass('in_stock') .addClass('3-5_days'); 如果想让它更简单实用,你可以创建一个支持链结构的jQuery函数:$.fn.make 阅读全文
posted @ 2013-01-04 23:10 ishibin 阅读(258) 评论(0) 推荐(0) 编辑
摘要: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><html><head><meta http-equiv="Expires" content="Fri, Jan 01 1900 00:00:00 GMT"><meta http-equiv="Pragma" content="no-cache"><meta http-equiv="Cache-Co 阅读全文
posted @ 2013-01-04 23:03 ishibin 阅读(349) 评论(0) 推荐(0) 编辑