我利用div的display="none"属性作了多个div切换效果
输入框记忆功能在网页刷新的时候好使,但是当input所在的div的display属性变为none或block的时候双击input输入框时就不显示以前输入的内容了(就是那个显示以前输入的内容的下拉框)我想让他切换div之后双击input输入框显示以前输入的内容
<html >
<head>
<SCRIPT>
function fnSaveForm(){
window.external.AutoCompleteSaveForm(oForm); }
function hidd(ints){
var nam;
var nams;
for (var i=1;i<=3;i++){
if (i==ints){
nam='bb'+ints;
document.getElementById(nam).style.display='block';
}else{
nams='bb'+i;
document.getElementById(nams).style.display='none';
}
}
}
</SCRIPT>
<title>Untitled Document</title>
</head>
<body> <FORM NAME="oForm">
<table width="346" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="76" class="hh1_2" id="hh1" ><a href="javascript:hidd('1')" >中心位置</a></td>
<td width="8" class="tit02bot"> </td>
<td width="76" class="hh1" id="hh2"><a href="javascript:hidd('2')">路 线</a></td>
<td width="8" class="tit02bot"> </td>
<td width="76" class="hh1" id="hh3"><a href="javascript:hidd('3')" >路况列表</a></td>
<td class="tit02bot"> </td>
</tr></table>
<div id="bb1">
This text is saved: 1
<INPUT TYPE="text" NAME="AutoCompleteTest" AUTOCOMPLETE="on">
<INPUT TYPE=button VALUE="Save Value" onclick="fnSaveForm()">
</div>
<div id="bb2" style="display:none">
This text is saved: 2
<INPUT TYPE="text" NAME="AutoCompleteTest" AUTOCOMPLETE="on">
<INPUT TYPE=button VALUE="Save Value" onclick="fnSaveForm()">
</div>
<div id="bb3" style="display:none">
This text is saved: 3
<INPUT TYPE="text" NAME="AutoCompleteTest" AUTOCOMPLETE="on">
<INPUT TYPE=button VALUE="Save Value" onclick="fnSaveForm()">
</div>
</FORM>
</body>
</html>
输入框记忆功能在网页刷新的时候好使,但是当input所在的div的display属性变为none或block的时候双击input输入框时就不显示以前输入的内容了(就是那个显示以前输入的内容的下拉框)我想让他切换div之后双击input输入框显示以前输入的内容
<html >
<head>
<SCRIPT>
function fnSaveForm(){
window.external.AutoCompleteSaveForm(oForm); }
function hidd(ints){
var nam;
var nams;
for (var i=1;i<=3;i++){
if (i==ints){
nam='bb'+ints;
document.getElementById(nam).style.display='block';
}else{
nams='bb'+i;
document.getElementById(nams).style.display='none';
}
}
}
</SCRIPT>
<title>Untitled Document</title>
</head>
<body> <FORM NAME="oForm">
<table width="346" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="76" class="hh1_2" id="hh1" ><a href="javascript:hidd('1')" >中心位置</a></td>
<td width="8" class="tit02bot"> </td>
<td width="76" class="hh1" id="hh2"><a href="javascript:hidd('2')">路 线</a></td>
<td width="8" class="tit02bot"> </td>
<td width="76" class="hh1" id="hh3"><a href="javascript:hidd('3')" >路况列表</a></td>
<td class="tit02bot"> </td>
</tr></table>
<div id="bb1">
This text is saved: 1
<INPUT TYPE="text" NAME="AutoCompleteTest" AUTOCOMPLETE="on">
<INPUT TYPE=button VALUE="Save Value" onclick="fnSaveForm()">
</div>
<div id="bb2" style="display:none">
This text is saved: 2
<INPUT TYPE="text" NAME="AutoCompleteTest" AUTOCOMPLETE="on">
<INPUT TYPE=button VALUE="Save Value" onclick="fnSaveForm()">
</div>
<div id="bb3" style="display:none">
This text is saved: 3
<INPUT TYPE="text" NAME="AutoCompleteTest" AUTOCOMPLETE="on">
<INPUT TYPE=button VALUE="Save Value" onclick="fnSaveForm()">
</div>
</FORM>
</body>
</html>
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货