当前位置: 代码迷 >> JavaScript >> JS 应用Jquery为<a>设置href
  详细解决方案

JS 应用Jquery为<a>设置href

热度:61   发布时间:2012-10-11 10:16:10.0
JS 使用Jquery为<a>设置href
<a id="sx" href="javascript:void(0);" onclick="checkAll('sx')" ><img								src="images/shuaxin.gif" width="74" height="31" border="0" /></a>&nbsp; 


$("#sx").attr("href","refresh_job.action?job.id="+actor_config+"&jobname="+jobname+"&pageNow="+page);


全选,全不选
$(function(){
        $("#chkAll").click(function(){
            if($(this).attr("checked")==true){
                $("input[name='check']").each(function(){
                    $(this).attr("checked",true);
                });
            }else{
				$("input[name='check']").each(function(){
		           	$(this).attr("checked",false);
		        });
			}
        });
   });   
  相关解决方案