代码1:
Reply to discussion (solution)
<form name="AddUserForm" method="post" action="pay.php?t=2" id="form2"><table style="width:100%;" cellspacing="0" border="1"> <tr> <td>我的收款方式: <input type="radio" name="xtmod" value="bank" checked onClick="Div2.style.visibility='visible';Div1.style.visibility='hidden'">银行/支付宝 <input type="radio" name="xtmod" value="address" onClick="Div2.style.visibility='hidden';Div1.style.visibility='visible'">邮局 我的姓名:<input name="name" type="text" id="Text1" value="传月刚" maxlength="20" style="width: 55px" disabled /><input type="hidden" name="name" id="name" value="传月刚"></td> </tr> <tr> <td><div id='Div1' style='position:absolute; visibility: hidden'>帐号地址: <input name="address" type="text" id="address" value="408403重庆市南川市水江镇" maxlength="100" style="width: 600px" disabled /><input type="hidden" name="address" id="address" value="408403重庆市南川市水江镇"> </div> <div id='Div2' style='visibility: visible'>帐号地址: <input name="bank" type="text" id="bank" value="支付宝:4635634@qq.com" maxlength="100" style="width: 600px" disabled /><input type="hidden" name="bank" id="bank" value="支付宝:4635634@qq.com"> </div> <tr></table></form>
but the error still occurs in the Firefox browser. It works under IE6. Can you help me check again?
Quoting the reply from zsx841021 on the 2nd floor:
HTML code
id It is best not to reuse
The error still occurs in Firefox browser, but it can be done under IE6 Yes, can you help me take another look?
Then use the method on the first floor. . . Writing like Div2.style cannot achieve compatibility, document.getElementById('div1') can