<div class="codetitle"> <span><a style="CURSOR: pointer" data="3081" class="copybut" id="copybut3081" onclick="doCopy('code3081')"><u>複製程式碼</u></a></span> 程式碼如下:</div> <div class="codebody" id="code3081"> <br><script type="text/javascript"> <BR>$( function () { <BR>$("#btnSubmit").click(function () { <BR>var txtName = $('#txtName').val(); <BR>var gender = $('#gender ').is(':checked') ? '男' : '女'; <BR>var isMarry = $('#isMarry').is(':checked') ? '已婚' : '未婚'; <BR>$('#divTip').css('display', 'block').html(txtName '<br/>' gender '<br/>' isMarry); <BR>}) <BR>} ) <BR></script> <br> </div> <br><div class="codetitle"> <span><a style="CURSOR: pointer" data="94795" class="copybut" id="copybut94795" onclick="doCopy('code94795')"><u>複製程式碼</u></a></span> 程式碼如下:</div> <div class="codebody" id="code94795"> <br><br> 程式碼如下:<br><div class="divFrame"> <br><div class="divTitle">請輸入以下資訊</div> <br><div class="divContent"> <br>姓名:<input id=" txtName" type="text" class="txtcss"><br> <br>性別:<input id="gender" name="raGender" type="radio" value="男">男<br><input id="Radio1" name="raGender" type="radio" value="女">女<br> <br>婚否:<input id="isMarry" type="checkbox"> <br> <br><div class="divBtn"><input id="btnSubmit" type="button" value="提交" class="btnCss"></div> <br> </div> <br> </div> </div> <div id="divTip" class="divTip"></div>