摘要: 具体思路:通过具体容器取得容器内所有图片 循环检查所有图片长宽 对超过的图重新定高度. 直接写成一个扩展好了,以后可以直接用.jquery.fn.ImageAutoSize = function(width,height){ $("img",this).each(function() { var image = $(this); if(image.width()>width) { im... 阅读全文
posted @ 2008-10-12 12:34 菩提树下的杨过 阅读(501) 评论(0) 推荐(0) 编辑
摘要: 获取一组radio被选中项的值 var item = $('input[@name=items][@checked]').val(); 获取select被选中项的文本 var item = $("select[@name=items] option[@selected]").text(); select下拉框的第二个元素为当前选中值 $('#select_id')[0].selectedIndex... 阅读全文
posted @ 2008-10-12 12:33 菩提树下的杨过 阅读(871) 评论(0) 推荐(0) 编辑