onclick传递参数


  • <html>  
  • <head>  
  • <script language="javascript">  
  • function test(value){  
  •         if(value=='1') {  
  •                 alert("11111111");  
  •         }else{  
  •                 alert("00000000");  
  •         }  
  • }  
  • </script>  
  • </head>  
  •   
  • <body>  
  • <form name="form1" method="post" action="">  
  •   <input type="radio" name="ra" value="1" onclick="test(this.value)"/>  
  •   个人  
  •   <input type="radio" name="ra" value="0" onclick="test(this.value)""/>  
  •   公司  
  • </form>  
  • </body>  
  • </html>  

  • 免责声明!

    本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



     
    粤ICP备18138465号  © 2018-2025 CODEPRJ.COM