随笔分类 -  Jquery

摘要:Flexigrid是Jquery的一个表格插件,可以显示后台传回的Json格式的数据。关于Flexigrid:http://flexigrid.info/Flexigrid对Json格式有特殊要求,其格式为:{"total":4, //总记录数"page":1, //页数"rows":[ //对象{"id":0,"cell":{"a":"测试1","b":"纯测试1"}}, //cell里面的才是真正的内容{&quo 阅读全文
posted @ 2011-11-28 11:51 天如er 阅读(804) 评论(0) 推荐(0) 编辑
摘要:在项目中用到了Jquery的Flexigrid表格插件,来显示后台传回的一串数据,Flexigrid使用Json的格式。该插件在Chrome和Firefox中完美显示,在IE下只能显示表头.内容无法显示.在google的groups中找到了答案:http://groups.google.com/group/flexigrid/browse_thread/thread/b51a13ef24ef1e45/88802ce2f7bfcec1修改(大约800行左右,可以查找"g.gDiv.style.width"定位)1 if (p.width!='auto') g. 阅读全文
posted @ 2011-11-25 22:19 天如er 阅读(1481) 评论(3) 推荐(0) 编辑
摘要:获取选中的值获取一组radio被选中项的值var item = $(“input[@name=items]:checked”).val();获取select被选中项的文本var item = $("select[@name=items] option[@selected]").text();select下拉框的第二个元素为当前选中值$('#select_id')[0].selectedIndex = 1;radio单选组的第二个元素为当前选中值$('input[@name=items]').get(1).checked = true;获取值: 阅读全文
posted @ 2011-11-25 18:42 天如er 阅读(17507) 评论(0) 推荐(0) 编辑