我想实现http://search.china.alibaba.com/business/k-%C0%BA%C7%F2%BC%DC_s-img_p-1_n-y.html中"旺旺在线"的效果该怎么实现
我用以下方法,每次传递过去的都的值都是1,我现在就是希望当选中时取值1,否则不是1
<input type="checkbox" name="rz" value="1"  onmousedown="location.href='?rz='+ this.value" <%if not checkstrisnull(rz) then response.Write("Checked")%> />

解决方案 »

  1.   

    <input type="checkbox" name="rz" value="1" onmousedown="location.href='?rz='+ this.value" <%if not checkstrisnull(rz) then response.Write("Checked")%> />var inpu = document.getElementsByTagName('input');
    if( inpu.checked == false  ){
       this.value = 0 ;
    }else{
       this.value = 1 ;
    }
      

  2.   

    <input type="checkbox" name="rz" value="1" onmousedown="location.href='?rz='+ this.checked?1:0" <%if not checkstrisnull(rz) then response.Write("Checked")%> />
      

  3.   


    <input type="checkbox" name="rz" value="1"  onclick="if(this.checked){location.href='?rz=1'}else{location.href='?rz=0'}" <%if not checkstrisnull(rz) and rz=1 then response.Write("Checked")%> />如上可以了
      

  4.   

    <if not checkstrisnull(rz) and rz=1 then response.Write("Checked")%> if not then  这是什么写法 java 还能这样写吗
      

  5.   

    错了,应该是VB类似的语法,可能是ASP。