Web code Common Tips Summary 1th/3 page _javascript Tips

Source: Internet
Author: User
1. Let the browser window never appear scroll bar.

<body style= "Overflow-x:hidden;overflow-y:hidden" > or <body style= "Overflow:hidden" > or <body scroll=no >
2, no horizontal scroll bar
<body style= "Overflow-x:hidden" >
3, no vertical scroll bar
<body style= "Overflow-y:hidden" >
2, how to shake the picture how to do.
<script language=javascript1.2>
<!--
var rector=2
var stopit=0
var a=1
var count=0
function init (which) {
Stopit=0
Shake=which
Shake.style.left=0
Shake.style.top=0
}
function Rattleimage () {
if ((!document.all&&!document.getelementbyid) | | stopit==1| | COUNT==100)
Return
count++
if (a==1) {
Shake.style.top=parseint (shake.style.top) +rector
}
else if (a==2) {
Shake.style.left=parseint (Shake.style.left) +rector
}
else if (a==3) {
Shake.style.top=parseint (shake.style.top)-rector
}
else{
Shake.style.left=parseint (Shake.style.left)-rector
}
if (a<4)
a++
Else
A=1
SetTimeout ("Rattleimage ()", 50)
}
function Stoprattle (which) {
Stopit=1
Count=0
Which.style.left=0
Which.style.top=0
}
-->
</SCRIPT>
<style>.shakeimage {position:relative}
</style>


4, in the DW how to add color to the horizontal line.

Without this setting in the DW, you can only add code to HTML: &LT;HR color=red noshade> Press F12 Preview to see. There is no such setting in the DW because the color property of    
5, how to achieve the full screen of flash in the Web page playback?

Whenever you set the width and height parameters to 100% in the HTML that invokes the SWF file, you can, of course, set the settings in the Flash export HTML file by opening the File menu; Selecting Publish Settings Pop-up Export Setup dialog box The dimensions option under the HTML tab, select percent (percent) after drop-down, and fill in the Width and Height boxes by 100. That's all.

6, why I inserted in the DW Flash animation is not looking!

If you do not install Dreamweaver and flash correctly, then when you preview, Dreamweaver will prompt you to lack the playback of the plugin, please press InstallAXFlash.exe and restart the computer. Now IE6 has bundled this program.

7, in Flash, if the right mouse button is shielded? What does the FS command mean?

Fscommand ("fullscreen", "True/false"); (full screen setting, true on, false off)
Fscommand ("ShowMenu", "True/false"); (right-click menu settings, true display, False does not appear)
Fscommand ("Allowscale", "True/false"); (zoom setting, True free scaling, false adjustment screen does not affect the size of the movie itself)
Fscommand ("Trapallkeys", "True/false"); (shortcut key setting, True shortcut key, false shortcut key off)
Fscommand ("exec"); (exe program call)
Fscommand ("Quit"); (exit close window)

What is the Stealth button in the 8,flash.

Use the hit frame in the button to make a button that is fully transparent only in the sensing area.

9, how to make a link to flash animation.

Dreamweaver can not be made to the flash link, only in Flash with Geturl () plus link, and then inserted into the Dreamweaver.

The skill of the layers in the 10,DW.

Layer can be nested, I personally give you a tip, hold down CTRL in the Layers panel and drag the layer to the place where you want to be the child layer, I think this is the most simple and intuitive way.

11, how to change the shape of the mouse?

CSS style panel in Dreamweaver4:
Press Ctr +shift+e--The Style Sheet dialog box appears, click New, the Edit dialog box appears, the last item on the left Extensions-cursor select the pointer form you want to change, and then apply the style sheet where you want to be changed, if the entire page has a <body Bgcolor= "#003063" text= "#ffffff" id=all> to join the line.
<span style= "cursor:x" > Sample </span>
Here Select (text) as an object, you can also change yourself to other, such as link.
X can equal =hand (hand), crosshair (cross), text (text cursor), wait (as the name suggests), default (default effect), Help (question mark), E-size (right arrow), Ne-resize (arrow on right), Nw-resize (arrow on left), W-resize (left arrow), Sw-resize (left down arrow), s-resize (down arrow), se-resize (down arrow right), auto (System automatically gives effect).

12, make a stamp with CSS, look at it!

<input Type=button value= Do I look like a stamp? style= "height:80px;border:2px dashed #cccccc" >


13, often the Internet friends may have been to such a number of websites, a home page will immediately pop a window, how to do it!

This JavaScript code can be implemented, excerpts from the Blue Forum.
"1, the most basic pop-up window code"
In fact, the code is very simple:
<script language= "JavaScript" >
<!--
window.open (' page.html ')
-->
</SCRIPT>
Because it is a piece of javascripts code, so they should put the lt; SCRIPT language= between "JavaScript" > Label and </script>. <!--and--> are useful for some versions of browsers that do not display the code in the label as text in these old browsers. To develop this good habit ah.
window.open (' page.html ') is used to control the pop-up of the new window page.html, if page.html is not in the same path as the main window, before the path, absolute path (http://) and relative path (...) should be specified. /) are available. Both single and double quotes are OK, just don't mix.
This section of code can be added anywhere in HTML,"2, after the Set pop-up window"
Let's say a pop-up window setting. Just add something to the code above.
Let's customize the appearance of this pop-up window, size, and popup position to fit the page's specifics.
<script language= "JavaScript" >
<!--
window.open (' page.html ', ' newwindow ', ' height=100, width=400, top=0,left=0, Toolbar=no, Menubar=no, Scrollbars=no, Resizable=no,location=no, Status=no ')
Write a line
-->
</SCRIPT>
Parameter explanation:
<script language= "javascript" > JS script started;
window.open the command to eject a new window;
The filename of the ' page.html ' pop-up window;
' NewWindow ' pop-up window name (not filename), not required, available null ' instead;
height=100 window height;
width=400 window width;
The pixel value of the Top=0 window from the top of the screen;
The pixel value of the left=0 window from the left side of the screen;
Toolbar=no whether the toolbar is displayed, yes for display;
Menubar,scrollbars represents the menu bar and scroll bar.
Resizable=no whether to allow changes to the window size, yes to allow;
Location=no whether the address bar is displayed, yes is allowed;
Status=no whether the information in the status bar is displayed (usually the file is open), yes to allow;
</SCRIPT> JS script End
"3, control pop-up window with function"
The following is a complete code.
<script language= "JavaScript" >
<!--
function Openwin () {window.open ("page.html", "NewWindow", "height=100, width=400, toolbar=
No, Menubar=no, Scrollbars=no, Resizable=no, Location=no, Status=no ")
Write a line
}
-->
</script>
<body onload= "Openwin ()" >
... Any page content ...
</body>
A function Openwin () is defined here, and the function content is to open a window. There is no use before calling it.
How to call it?
Method One: <body onload= "Openwin ()" > Browser pop-up window when reading the page;
Method Two: <body onunload= "Openwin ()" > Browser out of the page pop-up window;
Method Three: Call with a connection:
<a href= "#" onclick= "Openwin ()" > Open a Window </a>
Note: The "#" used is a virtual connection.
Method Four: Use a button to invoke:
<input type= "button" onclick= "Openwin ()" value= "open Window" >


14, did not use the form to write, let everyone casually look, nothing.

<title> Jiangnan Lotus Slice </title>
<meta http-equiv= "Content-type" content= "text/html; charset=gb2312 ">
<style type= "Text/css" >
<!--
. font1 {font-size:12px; color: #999999; Text-decoration:none}
a {font-size:12px; color: #999999; Text-decoration:none}
a:hover {font-size:12px; color: #000000; Text-decoration:none}
-->
</style>
<body bgcolor= "#FFFFFF" text= "#000000" >
<div class= "Font1" style= "writing-mode=tb-rl;height:200px" width=300>
<p> Summer Chantau
<p><a href= "index.htm" > One night Dew Mark yellow powder incense Yuan Yunfu </a>
<p> Yao last night new cool Wang Jinling
<p> a white Lotus open Wu Juannan
<p> New Rain Ying Qiu Tang Qisinmin
<p> 10 Li Xiang Qisinmin
<p> Zhuo Qing Lian but not demon Lu
</div>
</body>
Current 1/3 page 123 Next read the full text

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.