日期:2014-05-16  浏览次数:20297 次

js触发不同radio使input出现不同文字,并且input是无边框的【原创】

首先给出怎样使input的边框是看不到的:

<input type=text name=text1 id=text1 size=100 value = "" style = "background:;border:0"/>

只需要加style = "background:;border:0"/即可

?

以下是要显示文字的input:

<input type=text name=text1 id=text1 size=100 value = "" style = "background:;border:0"/>

以下是不同的radio:

<input id=all type=radio name=type value="phone" checked onClick="showphone()"/>
<label for=all>
固定电话??
</label>
<input id=all type=radio name=type value="telphone" onClick="showtelphone()"/>
<label for=all>
手机号码
</label>
<input id=lgr type=radio name=type value="qq" onClick="showQQ()"/>
<label for=lgr>
Q币充值
</label>
<input id=cty type=radio name=type value="car" onClick="showVal()"/>
<label for=cty>
车主服务
</label>

以下是某个方法;

function showVal(){
form.nbr.value = "粤A";
form.text1.value = "??????????????????????????? 请输入您的车牌号码后五位,例如粤A12345,只需输入12345";
document.getElementById("btnG").onclick = limitcar;
}

?

完成

?

自己看的