以下代码上的后退按钮无效。当我点击回来时,它不会进入上一页。任何人都可以建议我怎样才能使它工作?谢谢你的建议。我试了很多东西来检查一切可能。我没有让这个工作。
<html>
<head>
<title>Title</title>
<HTA:APPLICATION ID="Main"
APPLICATIONNAME="Main Application"
BORDER="thin"
BORDERSTYLE="normal"
CAPTION="yes"
CONTEXTMENU="no"
ICON=""
SHOWINTASKBAR="no"
SINGLEINSTANCE="yes"
SYSMENU="yes"
NAVIGABLE="yes"
MAXIMIZEBUTTON="no"
MINIMIZEBUTTON="no" />
<script language="VBScript" type="text/vbscript">
function doValidation()
dbalias=frmMyForm.test.Value
IF len(dbalias)=0 then
document.writeln("Please select the Environment and Try again")
doValidation=False
document.writeln("<br><tr><td nowrap align=Center colspan=2><input type=button value=Back name=ClickBack onclick=history.back()></td></tr>")
End if
End function
Sub cmdSubmit_OnClick
if (doValidation()) Then
dbalias=frmMyForm.test.Value
MGSBOX DBALIAS
End if
End Sub
</script>
</head>
<body bgcolor="#E6E6FA">
<h1 align="center"><font face="Times Roman" color="blue">Title</font></h1>
<form action="temp3.php" name="frmMyForm" id="frmMyForm" method="post">
<fieldset>
<label>* Select the Test </label>
<select name="test" id="test">
<option value="" selected></option>
<option value="test1">Test1</option>
<option value="test2">Test2</option>
<option value="test3">Test3</option>
</select>
<br>
<input type="button" name="cmdSubmit" id="cmdSubmit" value="Submit" style="height:25px; width:60px">
</fieldset>
</form>
</body>
</html>
答案 0 :(得分:0)
根据this horse's mouth,.HTA不支持历史记录。这似乎是合理的,因为.HTA缺乏IExplorer的chrome / gui。该链接提供了一个可以移植到VBScript的JScript实现,尽管应首先处理@Teemu的问题。
更新Teemu的评论
另外mouth提到历史问题 - 在IE 10上。所以也许 是一个版本的东西。有趣的是,这匹马切换到IE自助终端模式;也许这可能是解决OT现实世界问题的另一种方式。