jquery 开发中常用的代码
下面的代码都从自己手头中的项目中整理。比较乱,没有时间整理啊。
ajax:
$.ajax({ type:"post", url:"complexReport.do?method=getHySelectHtml", async: false, data:{jclx:encodeURIComponent(lx)}, success:function(data){ //alert(data) $("#sshytd").html(data); } });
$("#sumRadio").live("click",function(){ window.location.href="sumReport.do?method=showSumReportPage&path=sumReportPage&jclx=dbswr"; });
$("select[name=jclxselect] option:selected").text()) //name 为checkbox name function CheckAll(e,name){ var checked = $(e).attr('checked'); $(e).parents('table').find('input[type=checkbox][name='+name+']').each(function(){ if(!$(this).attr("disabled")){ $(this).attr("checked",checked); } }); }//下面的代码是给一个表格的某几列添加click时间,并且对
$.trim(content)