作者MingZhong (N NN)
看板Web_Design
标题Re: 天阿 ~~有谁能帮帮我阿(前面没人真正回答댠…
时间Mon Dec 20 22:03:29 2004
※ 引述《jerrytw (jerrylin)》之铭言:
: ※ 引述《jerrytw (jerrylin)》之铭言:
你把以下的内容复制,另存一页,然後自己去研究^^
点选哪个Radio,有设定的Textbox才会动作
<SCRIPT LANGUAGE=JAVASCRIPT><!--
function firmFocus() {
if (document.blurForm.testRadio[0].checked)
document.blurForm.firmText.focus();
else {
if (document.blurForm.testRadio[1].checked)
document.blurForm.personText.focus();
else
document.blurForm.firmText.blur();
}
}
function personFocus() {
if (document.blurForm.testRadio[1].checked)
document.blurForm.personText.focus();
else {
if (document.blurForm.testRadio[0].checked)
document.blurForm.firmText.focus();
else
document.blurForm.personText.blur();
}
}
function firmOn(object) {
firm = true;
person = false;
object.personText.value = '';
document.blurForm.firmText.focus();
}
function personOn(object) {
firm = false;
person = true;
object.firmText.value = '';
document.blurForm.personText.focus();
}
//--></SCRIPT>
<TABLE>
<FORM NAME="blurForm">
<TR>
<TD>Firm:</TD>
<TD><INPUT TYPE="TEXT" NAME="firmText" onFocus="firmFocus()">
<INPUT TYPE="RADIO" NAME="testRadio" onClick="firmOn(this.form)">
</TD>
</TR><TR>
<TD>Person:</TD>
<TD><INPUT TYPE="TEXT" NAME="personText" onFocus="personFocus()">
<INPUT TYPE="RADIO" NAME="testRadio" onClick="personOn(this.form)">
</TD>
</TR>
</FORM>
</TABLE>
<SCRIPT LANGUAGE=JAVASCRIPT><!--
document.blurForm.firmText.value = '';
document.blurForm.personText.value = '';
//--></SCRIPT>
--
※ 发信站: 批踢踢实业坊(ptt.cc)
◆ From: 218.170.230.169