Open a new window with the window.open parameter of HTML

time:14-10-15 forum:HTML web page, JS language and code
  http://blog.sina.com.cn/s/blog_57112b350100hwe9.html

regular Internet friends may have been to such a number of websites, a window into the front page will pop up a window,

or one A connection or button pops up, usually in this window that displays some notices, copyright information

, warning, welcome patronage, or other information that the author wants special hints. In fact, making such a page

is very easy, as long as you add a few Javascript code to the HTML of the page, you can achieve it. Next

face I will take you to analyze its mystery.
[1, the most basic pop-up window code]
the code is very simple:
[code].lt; SCRIPT LANGUAGE=.quot; javascript.quot;.Gt;
.lt;! LANGUAGE=.quot; javascript.quot;.Gt; tags and.Lt; /script.gt; between. .lt;! -- and --.gt; it works for some low version browsers and will not display the code in the label as text in this

older browsers. Get into this good habit.
window.open ('page.html') is used to control the new pop-up window page.html. If page.html

is not in the same path as the main window, the path, the absolute path (http://) and the relative path (.. /) can be written in front of the same path.
use single quotes and double quotes, but do not mix them.
this section of the code can be added to any location of HTML,.Lt; head.gt; and.Lt; /head.gt;.Lt; body.gt;.Lt; /body.gt; also, the earlier, the earlier, especially the page code length, and want the page to pop up as soon as possible to

.
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9

prev:College students do "buy car haggling di... next:Ji'nan 10 year old girl drop out of scho...
post comment
Notice



approved   Ten big snacks in Ji'nan   Burn 500 thousand ious village docto...   Parents want to be a good mirror for...   Ji'nan spring outing guide, let's go...   When she was 64 years old, she appea...
rand   Data:image/png; what is Base64   Distance between outer distance and ...   WOW.js - making the page scrolling m...   WowJS: adds a simple animation to th...   Introduction to CSS3 animation and t...
ads

other

Because all the contents of this site are reproduced from other media, the intention is to provide free services to the public, but it does not mean that this site agrees with its views, and can not be responsible for the authenticity of its verification, such as the copyright unit or individual of the manuscript does not want to publish on this site, please Contact me, I will immediately remove it, thank you. Contact: atseashawk@163.com