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>
posted on 2018-04-07 16:09 David_Deng 阅读(10228) 评论(0) 编辑 收藏 举报