Home >Web Front-end >HTML Tutorial >Experts can help me take a look at why there is an error when calling the input of this radio button? _html/css_WEB-ITnose

Experts can help me take a look at why there is an error when calling the input of this radio button? _html/css_WEB-ITnose

WBOY
WBOYOriginal
2016-06-24 12:08:351010browse

代码1:
e1cbdb5d9ce74730dda482902e277bdc1bcdc4e705469067c8788c7364cbc605
    a34de1251f0d9fe1e645927f19a896e8
      b6c5a531a458a2e790c1fd6421739d1c我的收款方式:
ead7ffc9083051271f3576bce530016e银行/支付宝 
    2dd52960b4a17835aa1c6d25f52d3399邮局   我的姓名:b1023c1ac48aca336254aa493624f8eb0d0965e80357b508095de69c24c50e18b90dd5946f0946207856a8a37f441edf
    fd273fcf5bcad3dfdad3c41bd81ad3e5
    a34de1251f0d9fe1e645927f19a896e8
      b6c5a531a458a2e790c1fd6421739d1cd6a14ecc56bb7e5f4ea5bb2b23e28441帐号地址: 
             29ddfbbbd96de56c697d47710f0249afb41290b0f706d42104296b9ff3247d2e 
        16b28748ea4df4d9c2150843fecfba68
        c9796e1f1478f260410de83162a19800帐号地址: 
             6e8f4405010dbc75128a038d53e75fda7ceb67aeb910f4e59f4b8d6d5bf7d90e
        16b28748ea4df4d9c2150843fecfba68
a34de1251f0d9fe1e645927f19a896e8
f16b1740fad44fb09bfe928bcc527e08f5a47148e367a6035fd7a2faa965022e

It is necessary to disable input. If input can be input, this code will run correctly:


Code 2:
86ef6ad22e656a360e499c4af05ca903307f6e56aff58e6e7cc59447226e72d5
a34de1251f0d9fe1e645927f19a896e8
b6c5a531a458a2e790c1fd6421739d1cMy payment method:
bf02b5ddf7417177509687a306766931Bank/Alipay
93cfcdec4e5b66f0f068d25681f68e03Post Office My name:4a7a0c916efe085609c807041a6cd5c4372d66d814058dda0618b5ef3bdafda6b90dd5946f0946207856a8a37f441edf
fd273fcf5bcad3dfdad3c41bd81ad3e5
a34de1251f0d9fe1e645927f19a896e8
b6c5a531a458a2e790c1fd6421739d1cde270690f66d1a6ece5709d0c299a2acAccount address:
                                                                                                                                                                                                                                                                                  ​" style="width: 600px" />
                                                                    "bank" type="text" id="bank" value="Alipay: 4635634@qq.com" maxlength="100" style="width: 600px" />
a34de1251f0d9fe1e645927f19a896e8
f16b1740fad44fb09bfe928bcc527e08f5a47148e367a6035fd7a2faa965022e

Code 2 can run correctly. Who can help me debug code 1? ! Thanks! Input is required to run correctly in the disabled state.



Reply to discussion (solution)
f89a66454c143493e88b250538cf45d1Bank/Alipay



id It is best not to reuse

<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>
HTML code

id It is best not to reuse



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

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn