我在创建 onClick 事件的 aspx 页面上有一个 div。div 的 onClick 指向:
onclick="'javascript:WebForm_DoPostBackWithOptions(new WebForm_PostBackOptions("ctl00$ContentPlaceHolder1$Wizard1$StepNavigationTemplateContainerID$StepNextButton", "", true, "", "", false, false))'"
上面的链接恰好是页面上 StepNext 按钮的 onClick。我已经删除了该按钮的可见性,因此希望允许它,以便当我单击此 div 时,它会转到下一步。
然而,它不起作用?浏览器什么都不做。有没有办法可以从 aspx 页面转到下一步?
编辑:这是一些额外的代码:
div(注意:我尝试使用它下面代码的确切 onClick,但也不起作用):
<div id="Box1" class="BoxUploadStyle" onmouseover="this.style.backgroundImage='url(../IMG/box1_over.gif)';this.style.cursor='hand';this.style.cursor='pointer';"
onmouseout="this.style.backgroundImage='url(../IMG/box1.gif)';"
onclick="javascript:WebForm_DoPostBackWithOptions(new WebForm_PostBackOptions('Box1', '', true, '', '', false, false))">
<h3><a href="#">Simple Upload</a></h3>
Upload upto 10 files each time.
</div>
这是按钮 Next 和 Previous 的代码(来自 View Source - 因为它是向导的一部分):
</tr><tr>
<td align="right">
<input type="submit" name="ctl00$ContentPlaceHolder1$Wizard1$StepNavigationTemplateContainerID$StepPreviousButton" value="Previous" id="ctl00_ContentPlaceHolder1_Wizard1_StepNavigationTemplateContainerID_StepPreviousButton" style="color:#284E98;background-color:White;border-color:#507CD1;border-width:1px;border-style:Solid;font-family:Verdana;font-size:0.8em;" />
<input type="submit" name="ctl00$ContentPlaceHolder1$Wizard1$StepNavigationTemplateContainerID$StepNextButton" value="Next" onclick="javascript:WebForm_DoPostBackWithOptions(new WebForm_PostBackOptions("ctl00$ContentPlaceHolder1$Wizard1$StepNavigationTemplateContainerID$StepNextButton", "", true, "", "", false, false))" id="ctl00_ContentPlaceHolder1_Wizard1_StepNavigationTemplateContainerID_StepNextButton" style="color:#284E98;background-color:White;border-color:#507CD1;border-width:1px;border-style:Solid;font-family:Verdana;font-size:0.8em;" />
</td>