下面代码上的后退按钮不起作用。当我点击“上一步”时,它不会回到上一页。有没有人能建议我怎么让它工作?谢谢你的建议。我试了很多去检查所有可能的东西。我没把这玩意修好。
<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>发布于 2014-09-23 01:09:07
根据this horse's mouth的说法,.HTA不支持历史记录。这似乎是合理的,因为.HTA缺少IExplorer的chrome/gui。该链接提供了一个可以移植到VBScript的JScript实现,尽管@Teemu的问题应该首先得到处理。
更新wrt Teemu的评论:
另一个mouth提到了历史问题--在IE10上。所以它可能是一个版本问题()。有趣的是,这匹马切换到了IE kiosk模式;也许这可能是解决OT现实世界问题的另一种方式。
https://stackoverflow.com/questions/25975187
复制相似问题