[英]Open a Internet explorer/Firefox etc window with Chrome
I'm building a smaller Web Builder with Javascript and I want the user to be available to preview their page in all the major browsers. 我正在使用Javascript构建较小的Web Builder,并且希望用户可以在所有主要浏览器中预览其页面。 Because that the tool only is available for Chrome I need them to get the chance to open a Internet explorer window with the same information, and the same for Firefox and Opera and Safari... Is there a way to do so, in Javascript? 因为该工具仅适用于Chrome,所以我需要他们有机会打开一个具有相同信息的Internet Explorer窗口,并且对于Firefox,Opera和Safari也具有相同的信息。是否可以使用Javascript来做到这一点?
PS The information that should appear on in the window is stored in a variable. PS应该在窗口中显示的信息存储在变量中。
If JS can call firefox.exe
, it could also call nasty_trojan.exe
. 如果JS可以调用firefox.exe
,它也可以调用nasty_trojan.exe
。 The best you can do is generate a custom link server-side, and say "paste this link into your other browsers. 最好的办法是在服务器端生成一个自定义链接,然后说“将该链接粘贴到其他浏览器中。
Unless you'd like to be really fancy, in which case you need to render the pages server-side, ala http://browsershots.org/ . 除非您真的想花哨,否则在这种情况下,您需要在服务器端呈现页面,例如http://browsershots.org/ 。
There's a chance it could be done if you wrote it as a chrome extension, because those have some measure of trust, but the JS on a page stays very much inside its sandbox. 如果您将其编写为chrome扩展名,则有可能实现此目标,因为它们具有一定程度的信任度,但页面上的JS仍在其沙箱中。
This doesn't belong on the answers, but I did not see how to comment (I am new, sorry!). 这不属于答案,但我没有看到如何评论(我是新来的,对不起!)。 This may help. 这可能会有所帮助。 It seems you may need to use a java applet, at least, I'm seeing that in a few places. 看来您可能需要使用Java小程序,至少在某些地方我看到了这一点。 Hope I've helped! 希望我有所帮助!
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.