window.open 与 Mac OSx 版本 (Safari) 的兼容性
@jackJoe 我的更改没有解决我的问题,这里是图像按钮和 window.open 的渲染 HTML:
<div id="ctl00_LoginPanel" onkeypress="javascript:return WebForm_FireDefaultButton(event, 'ctl00_imbSubmit2')" style="width:201px;">
当用户是 Safari 用户时,我已成功更改面板的默认按钮。图像按钮也显示为输入类型:
<input type="image" name="ctl00$imbSubmit2" id="ctl00_imbSubmit2" src="../images/Submitbutton.jpg" alt="Submit2" onclick="javascript:WebForm_DoPostBackWithOptions(new WebForm_PostBackOptions("ctl00$imbSubmit2", "", true, "", "", false, false))" style="border-width:0px;" />
为什么这在 Safari 中不起作用?
Response.Write("<script>window.open('" + strURL + "');</script>")
我需要这样吗:
Response.Write("<script>javascript:window.open('" + strURL + "');</script>")
@jackJoe my changes did not resolve my issue here is the rendered HTML for the Image Button and the window.open:
<div id="ctl00_LoginPanel" onkeypress="javascript:return WebForm_FireDefaultButton(event, 'ctl00_imbSubmit2')" style="width:201px;">
I have successfully changed the defaultbutton for the panel when the user is a Safari user. The Image Button also shows up as an input type:
<input type="image" name="ctl00$imbSubmit2" id="ctl00_imbSubmit2" src="../images/Submitbutton.jpg" alt="Submit2" onclick="javascript:WebForm_DoPostBackWithOptions(new WebForm_PostBackOptions("ctl00$imbSubmit2", "", true, "", "", false, false))" style="border-width:0px;" />
Why doesn't this work in Safari??
Response.Write("<script>window.open('" + strURL + "');</script>")
Do I need to have it like this:
Response.Write("<script>javascript:window.open('" + strURL + "');</script>")
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论