标签:style class blog code java http
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 2 <html xmlns="http://www.w3.org/1999/xhtml"> 3 <head> 4 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 5 <title>调查问卷</title> 6 <style type="text/css"> 7 #contentid{ 8 display:none; 9 } 10 </style> 11 </head> 12 13 <body> 14 <!--单选按钮演示 。 15 1、是否参与调查问卷? 16 2、性格测试 17 --> 18 <script type="text/javascript"> 19 function showContent(node){ 20 21 var oDivNode = document.getElementById("contentid"); 22 23 with(oDivNode.style){ 24 if(node.value==‘yes‘){ 25 display="block"; 26 } 27 else 28 { 29 display="none"; 30 } 31 } 32 } 33 </script> 34 <!--问卷调查--> 35 <div> 36 <input type="radio" name="wenjuan" value="yes" onclick="showContent(this)" />是 37 <input type="radio" name="wenjuan" value="no" checked="checked" onclick="showContent(this)" />否 38 </div> 39 <div id="contentid"> 40 问卷调查:<br/> 41 您的姓名:<input type="text" /><br/> 42 您的邮箱:<input type="text" /> 43 </div> 44 45 </body> 46 </html>
标签:style class blog code java http
原文地址:http://www.cnblogs.com/aineko/p/3783755.html