Window. Open open Open the form and if nested code, window. open nested
If you don't talk much about it, paste the Code directly.
The Code is as follows:
<Script> function openWindow () {var my = confirm ("do you want to open the window? ") If (my = true) {var url = prompt (" by entering the dialog box, determine the url to open "," http://www.imooc.com ") if (url! = Null) {window. open ('htttp: // www.refw.org.cn ',' _ blank ', 'width = 300, height = 300, scrollbars = no, menubar = no ')} else {alert ('Don't open');}/* if nested */} else {alert ("88 ")}} </script> <body> <input type = "button" onclick = "openWindow ()" value = "click"> </body>
The code is just a few simple words. If you have any questions, please leave a message. The editor will reply to you in time!
Articles you may be interested in:
- JQuery adaptive IFrame height (nested compatibility with IE, ff, safafi, chrome)
- Js implementation of web pages to prevent nesting by iframe framework and the differences between several location. href
- Name of multiple windows opened with window. open () in js
- Javascript window. open the new window and you cannot open it again. How can this problem be solved?
- Window. open () Explanation and browser compatibility examples
- In js, window. open opens a new page.
- Describes the nested use of if Statements in Python.
- How to use if statement nesting in Lua
- Detailed description of nested Writing of if... else statements in Java programming