本文介绍了我如何在firefox版本51中启用弹出窗口的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 我使用这个javascript函数来显示弹出窗口,但它正在使用firefox版本27,但是当我将firefox更新到版本51时它无法正常工作 - --- java脚本代码 -------- 函数ShowDialog(){ var rtvalue = showModalDialog(AdmissionRegPopup.aspx,sss,dialogWidth:800px; dialogHeight:550px; dialogLeft:250px;); 文件。 getElementById(ctl00_ContentPlaceHolder1_txtreg)。value = rtvalue.NameValue; } 什么我试过了: 函数ShowDialog(){ var rtvalue = showModalDialog( AdmissionRegPopup.aspx,sss,dialogWidth:800px; dialogHeight:550px; dialogLeft:250px;); document.getElementById(ctl00_ContentPlaceHolder1_txtreg)。value = rtvalue.NameValue; } 解决方案 这是因为该函数已被弃用,并且已针对最近的浏览器删除。请参阅 Window.showModalDialog() - Web API | MDN [ ^ ]。 如需替代方案,请阅读上述链接中的另请参阅部分,然后搜索javascript showmodaldialog replacement或javascript showmodaldialog alternative。 I used this javascript function to show popup window but it is working on firefox version 27 but when i update firefox to version 51 it is not working-----java script code--------function ShowDialog() { var rtvalue = showModalDialog("AdmissionRegPopup.aspx", "sss", "dialogWidth:800px; dialogHeight:550px; dialogLeft:250px;"); document.getElementById("ctl00_ContentPlaceHolder1_txtreg").value = rtvalue.NameValue; }What I have tried:function ShowDialog() { var rtvalue = showModalDialog("AdmissionRegPopup.aspx", "sss", "dialogWidth:800px; dialogHeight:550px; dialogLeft:250px;"); document.getElementById("ctl00_ContentPlaceHolder1_txtreg").value = rtvalue.NameValue; } 解决方案 That is because that function is deprecated and has been removed for recent browsers. See Window.showModalDialog() - Web APIs | MDN[^].For alternatives read the "See Also" section at the above link and search for "javascript showmodaldialog replacement" or "javascript showmodaldialog alternative". 这篇关于我如何在firefox版本51中启用弹出窗口的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 10-11 19:32