<! -- Star
Window. Open ('','', 'fullscreen = 1 ')
Window. Open ('','', 'channelmode = 1 ')
Flash pop-up window
Javascript: window. Open ('HTTP: // response); void (0)
Flash dynamically imports external text
Loadvariables ("text.txt", "_ root. mcname ");
Is it possible to use layers to cover flash?
1. Add <Param name = "wmode" value = "Transparent">
2. <body onblur = self. Focus ()>
---------------------- Pop-up window -------------------------------
<Script language = "JavaScript">
<! --
VaR GT = Unescape ('% 3E ');
VaR popup = NULL;
VaR over = "launch pop-up Navigator ";
Popup = Window. Open ('', 'popupnav', 'width = 300, Height = 225, resizable = 1, scrollbars = auto ');
If (popup! = NULL ){
If (Popup. Opener = NULL ){
Popup. Opener = self;
}
Popup. Location. href = 'HTTP: // home.lufeng.net/huangyx/xsc1/pop.htm ';
}
// -->
</SCRIPT>
---------------------------
How to make tables side by side? First, we should write in the first table as follows: "<Table border = 0 cellpadding = 1 cellspacing = 1 align = left>" the most important sentence in this table is "align = left. Then you should add align = left in the second table to achieve your goal.
---------------------------------------------------------------------
How can we avoid spaces between the line spacing of two form forms? Write <Table> <form> <tr>... </tr> </form> </table>
-----------------------------------------------------------------------------
Close Window <a href = "javascript: Self. Close ();"> Close Window </a>
----------------------------------------------------------
How do I add background music to my page?
IE: <bgsound src = "*. Mid" loop = infinite>
NS: <embed src = "*. Mid" autostart = true hidden = true loop = true>
------------------------------------------------------------------
Flash transparency: <Param name = "wmode" value = "Transparent">
Flash occupies the lower layer: <Param name = wmode value = opaque>
Flash full screen fscommand (fullscreen, true)
Right-click flash shielding:
In the flash browser, fscommand ("showmenu", "false ");
In IE, stage. showmenu = false
The IFRAME background can be transparent: <body bgcolor = transparent>
<Marquee Height = 100% width = 95% direction = up onmouseout = This. Start ()
Onmouseover = this. Stop () scrollamount = 1 scrolldelay = 1> Yes </font> </marquee>
-----------------------------------------
Square meters: m <sup> 2 </sup>
----------------------------------------
Framework
<IFRAME Style = 'height: 98%; width: 100%; 'leftmargin = 0 scrolling = No framespacing = 0 frameborder = 0 src = ../web/hyforum/index3.php? Index = 1> </iframe>
<IFRAME border = 0 name = msghtml marginwidth = 0
Framespacing = 0 marginheight = 0 src = "sitemap. Files/msg.htm" frameborder = 0
Noresize width = 150 scrolling = No Height = 230 vspale = "0"> </iframe>
----------------------------------
The layer is absolutely fixed:
. Layer-K {position: relative; clip: rect ()}
Place the layer in the cell when locating the layer. Then use the following in the cell:
<TD class = Layer-k>!
---------------------------------------------------------------
1) set as Homepage
<A href = # onmouseover = This. style. behavior = "URL (# default # homepage)"; this. setHomePage ("http://www.jsshow.com/");> set to home </a>
(2) Add to favorites
Onclick = "window. External. AddFavorite ('HTTP: // ivwsky.126.com ', 'skystore ')"
Href = "">
(3) display scrolling information in the status bar of the window
(1) Add in the bodyCode:
<Script language = "JavaScript">
VaR MSG = "welcome to the website resources network. Here you will have some gains! ";
VaR I = 1
Function scroll ()
{
Mess = msg. substring (I, MSG. Length) + "" + msg. substring (0, I)
Window. Status = mess
I ++;
If (I> = MSG. Length) I = 1; // you can specify to keep scrolling.
SetTimeout ("scroll ()", 200); // you can specify the scroll speed.
}
</SCRIPT>
Scroll bar style with white and shadow
<Style>
Body {SCROLLBAR-FACE-COLOR: # ffffff; SCROLLBAR-HIGHLIGHT-COLOR: # cccccc; SCROLLBAR-SHADOW-COLOR: # cccccccc; SCROLLBAR-3DLIGHT-COLOR: # ffffff; SCROLLBAR-ARROW-COLOR: #999999; SCROLLBAR-TRACK-COLOR: # cccccccc; SCROLLBAR-DARKSHADOW-COLOR: # ffffff ;}
</Style>
Horizontal scroll bars:
This may be because your website size is too tight,
The following methods are available:
1. Based on the 800*600 design, you 'd better set the table to 766*426, which is correct.
2. You can use the code to make the Horizontal Pull never appear:
Style = "OVERFLOW-Y: hidden; OVERFLOW-X: hidden"
Good obvious OVERFLOW-Y: hidden for hidden horizontal pull,
OVERFLOW-X: hidden for vertical pull.
Gathering of Common Code in web design)
Double-click automatic screen rolling; click Stop
Disable page Body Selection
<Body foo1 = "Return false" foo1 = "Return false" foo1 = "Return false" onselect = "document. selection. empty () "oncopy =" document. selection. empty () "onbeforecopy =" Return false "onmouseup =" document. selection. empty () ">
Remove the image toolbar that automatically appears in IE6 and set the galleryimg attribute to false or no.
When you click an empty link, the page is often reset to the top.
The Code "javascript: void (null)" replaces the original "#" mark
How to prevent others from placing your webpage in the framework
<Script language = "JavaScript"> <! -- If (self! = Top) {top. Location = self. Location;} --> </SCRIPT>
Page timed refresh
<Meta http-equiv = "refresh" content = "seconds">
The page is switched to a new address at regular intervals.
<Meta http-equiv = "refresh" content = "seconds; url = URL">
Display date
<Script language = "JavaScript"> <! --
Today = new date ();
VaR week; var date;
If (today. getday () = 0) Week = "Sunday"
If (today. getday () = 1) Week = "Monday"
If (today. getday () = 2) Week = "Tuesday"
If (today. getday () = 3) Week = "Wednesday"
If (today. getday () = 4) Week = "Thursday"
If (today. getday () = 5) Week = "Friday"
If (today. getday () = 6) Week = "Saturday"
Date = (today. getyear () + "year" + (today. getmonth () + 1) + "month" + today. getdate () + "day" + ""
Document. Write ("<span style = 'font-size: 9pt; '>" + date + week + "</span> ");
// -->
</SCRIPT>
Set as Homepage
<A href = # onclick = "this. style. behavior = 'url (# default # homepage) '; this. setHomePage ('url'); "> set as homepage </a>
Add to favorites
<A href = "javascript: window. External. AddFavorite ('url', 'title')"> Add to favorites </a>
Webpage effect set
Webpage effect set
1. Ignore right-click
<Body oncontextmenu = "Return false">
Or
<Body style = "overflow-Y: hidden">
2. Add background music
IE: <bgsound src = "*. Mid" loop = infinite>
NS: <embed src = "*. Mid" autostart = true hidden = true loop = true>
</Embed>
*. Mid: The MIDI format file of your background music
3. Simple window. Open Method
<A href = "#"
Onclick = "javascript: window. Open (file path/file name, newwindow,
Toolbar = No, scrollbars = Yes, resizable = No, top = 0, Left = 0,
Width = 400, Height = 300); "> text or image </a>
Parameter description:
<Script language = "JavaScript"> the JS script starts;
Window. Open command to pop up a new window;
File name in the file path/file name pop-up window;
The name (not the file name) of the newwindow pop-up window. It is optional and can be replaced by null;
Width = 400 window width;
Height = 300 window height;
Top = the pixel value between the 0 window and the top of the screen;
Left = 0 the pixel value between the window and the left of the screen;
Toolbar = No indicates whether to display the toolbar. Yes indicates display;
Menubar. scrollbars indicates the menu bar and * dynamic bar.
Resizable = No: whether to change the window size. Yes: Yes;
Location = No indicates whether the address bar is displayed. Yes indicates yes;
Status = No whether to display the information in the status bar (usually the file has been opened), yes is allowed;
</SCRIPT> end of JS script
4. Simple page Encryption
<Script language = "JavaScript">
<! --
Function loopy (){
VaR sword = "";
While (sword! = "Login") {sword = prompt ("Enter your login password ");}
Alert ("Login successful! ");
}
Loopy ()
// -->
</SCRIPT>
5. The background image does not move when pulling the page
<Style>
Body {background-image: url(logo.gif );
Background-repeat: No-Repeat; Background-position: Center}
</Style>
6. An error occurred while saving the page by the browser.
<NoScript> <IFRAME src = "*. html"> </iframe> </NoScript>
7. Random image replacement
<SCRIPT>
Document. Write (2.16.gif "Height =" 40 "width =" 50 ">)
</SCRIPT>
The image file is named 0.gif 1.gif 2.gif 3.gif 4.gif.
8. Window timed close
Add the following code to the webpage file area:
<Script language = "JavaScript">
Function closeit () {setTimeout ("self. Close ()", 10000) // millisecond}
</SCRIPT>
Then add the following content to the <body> label: <body onload = "closeit ()">
9. Web page automatically closed
<HTML>
<Head>
<Object ID = closes type = "application/X-oleobject"
Classid = "CLSID: adb880a6-d8ff-11cf-9377-00aa003b7a11">
<Param name = "command" value = "close">
</Object>
</Head>
<Body onload = "window. setTimeout (closes. Click (), 10000)">
This window will be automatically closed 10 seconds later and will not be prompted.
</Body>
</Html>
10. Automatic Webpage refresh
Record in Head
<Meta HTTP-EQUIV = "refresh" content = "20">
The refresh is automatically refreshed 20 seconds later. You can change it to any value.
11. Automatic Webpage Conversion
<Meta HTTP-EQUIV = "refresh" content = "Time (SEC); url = address">
12. Keep the layer at the beginning without being overwritten by IFRAME and object.
Insert the IFRAME or object in the layer to set the Z-index value.
<Div Z-index: 2> <object ***> </Object> # front
<Div Z-index: 1> <object ***> </Object> #
<Div id = "Layer2" style = "position: absolute; top: 40; width: 400px;
Height: 95px; Z-index: 2 "> Height = 100% width = 100%>
<IFRAME width = 0 Height = 0> </iframe>
</Div>
<Div id = "layer1" style = "position: absolute; top: 50; width: 200px;
Height: 115px; Z-index: 1 ">
<IFRAME Height = 100% width = 100%> </iframe>
</Div>
13. Back to previous page
<A href = javascript: history. Back (1)> "back to previous page" </a>
14. Close Window
<A href = javascript: Self. Close ()> Close Window </a>
15. Transparent background of IFRAME
<IFRAME id = "iframe1" src = "iframe.htm"
Allowtransparency = "true"
Style = "background-color: Green"> </iframe>
----------------------------------------------------
Make the pop-up window open only once
<SCRIPT>
Function openwin (){
Window. Open ("page.html", "", "width = 200, Height = 200 ")
}
Function get_cookie (name ){
VaR search = Name + "="
VaR returnvalue = "";
If (Documents \. Cookie. length> 0 ){
Offset = Documents \. Cookie. indexof (Search)
If (offset! =-1 ){
Offset + = search. Length
End = Documents \. Cookie. indexof (";", offset );
If (END =-1)
End = Documents \. Cookie. length;
Returnvalue = Unescape (events \. Cookie. substring (offset, end ))
}
}
Return returnvalue;
}
Function loadpopup (){
If (get_cookie ('popped') = ''){
Openwin ()
Documents \. Cookie = "popped = yes"
}
}
</SCRIPT>
<Body onload = "loadpopup ()">
-----------------------------------------------------------------------------
How can I make the browser fail to save the page?
<NoScript>
<IFRAME src = "*. html">
</Iframe>
</NoScript>
---------------------------------------
How can I refresh CSS without refreshing a new page?
<Style>
Button {color: #000000 ;}
</Style>
<Button onclick = document. stylesheets [0]. rules [0]. style. color = 'red'> click the button to change the button selection character in the style label to Red. </button>
Bytes ----------------------------------------------------------------------------------------
The dotted border is not displayed.
Onfocus = "This. Blur ()"
Solve the problem that IFRAME cannot be adaptive in the page
[1:10:33 | Author: siyizhu | from: blueidea]
IFRAME is a special control. Its height can only be an absolute value, and the percentage cannot be used. However, you can use JavaScript to output an iframe html. However, this relative value can only be assigned after the page is loaded. If you resize. The widget size is still the original loaded height. In this case, you are refreshing. The height value is reloaded.
Here I came up with a solution. It is to add an onresize event to the body tag; when you load the onload, it triggers the written JS function. Then this function is also set out during onresize. To solve the above problems.
The Demo code is as follows:
<HTML>
<Body bgcolor = "#000000" onLoad = "resizeheight ();" onresize = "resizeheight ();">
<Script language = "JavaScript">
Function resizeheight ()
{
Document. getelementbyid ("Web". style. Height = parseint (document. Body. clientHeight-50 );
}
</SCRIPT>
<IFRAME name = "Web" id = "Web" width = "100%" scrolling = "no" frameborder = 0 src = "about: blank"> </iframe>
</Body>
</Html>
End -->