Tips | Web page
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 ()", m)
}
Function Stoprattle (which) {
Stopit=1
count=0
which.style.left=0
which.style.top=0
}
//--〉
〈/script〉
〈style〉.shakeimage { position:relative}
〈/style〉
〈img src= "path to Picture" Onmouseout=stoprattle (This) onmouseover=init (this); rattleimage () class=shakeimage〉
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: 〈HR color=red noshade〉 Press F12 Preview to see. There is no such setting in the DW because the 〈hr〉 color property is not supported in NC.
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" examples 〈/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 piece of code can be added anywhere in the HTML, between 〈head〉 and 〈/head〉, 〈body bgcolor= "#003063" text= "#ffffff" id=all〉 can also be 〈/body〉, the more early execution, especially the length of the page code, Also want to make the page pop up earlier as far as possible forward.
"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.
〈html〉
〈head〉
〈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〉
〈/head〉
〈body〉
... Any page content ...
〈/body〉
〈/html〉
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〉 the browser to read the page pop-up window;
Method Two: 〈body onunload= "Openwin ()" The browser to leave the page pop-up window;
Method Three: Call with a connection:
〈a href= "#" open a window 〈/a〉
Note: The "#" used is a virtual connection.
Method Four: Use a button to invoke:
〈input type= "button" value= "open Window"
14, did not use the form to write, let everyone casually look, nothing.
〈html〉
〈head〉
〈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〉
〈/head〉
〈body bgcolor= "#FFFFFF" text= "#000000"
〈div class= "Font1" style= "writing-mode=tb-rl;height:200px" width=300〉
〈p〉 Midsummer Chantau
〈p〉〈a href= "index.htm" One Night dew mark yellow powder fragrant yuan Yunfu 〈/a〉
〈p〉 the new cool Wang Jinling last night
〈p〉 a white Lotus to open Wu Juannan freely
〈p〉 new Rain Ying Qiu full Tang Qisinmin
〈p〉 10 Li Xiang Qisinmin
〈p〉 Zhuo Qing Lian but not demon Lu
〈/div〉
〈/body〉
〈/html〉
15,IE6 has supported custom cursor!
Syntax format cursor:url (icon)//cur or ANI file.
Cur is the cursor (cursor) file in Windows, and the cursor file is the same as the icon file except that the file header has a different value.
ANI is the animated cursor (icon) file in Windows.
〈style type= "Text/css"
〈!--
. unnamed1 {Cursor:url (arrow2c.cur)}
--〉
〈/style〉
16, using marquee to do the scrolling subtitles. This also I just saw the forum friend is asking.
Grammar:
align=# | Top | middle| Bottom//Alignment)
Behavior=alternate | SCROLL | SLIDE//Moving Way
bgcolor=color//Background Color Area
Direction=down | Left | Right | Up//moving direction
Loop=n//Cycle times (default is loop)
scrolldelay=milliseconds//delay
height=# width=#//Area area
hspace=# vspace=#//blank area
scrollamount=#//speed of movement
〈marquee align=top behavior=alternate bgcolor= #000000 height=60 width=433 scrollamount=5〉〈/marquee〉
17, there are some fonts in the FLASH5, after the break into a group of things is why? Is there a way to solve it?
This is a common problem for everyone! may be to support the font is not good! I am a transparent GIF picture format, and then poured.
How do you implement the "Add Favorites" feature to 18,flash's Web page?
Add Geturl to AS ("Java Script:window.external.addFavorite (http://www.webjx.com ', ' Web Teaching Network ')")
19, in Flash, the difference between the dynamic property of the text and the input attribute.
Input text can be changed by the user or program at run time.
Ynamic text is only allowed to be modified by the program.
20, how to call Dreamweaver in IE to edit.
Believe that a lot of friends in the use of WinME or Window2000, will meet is a problem. Very simply, turn on our notebook program and save it as a *.reg file. Double-click it to add information to the registry.
REGEDIT4
[Hkey_classes_root.htmopenwithlistdreamweaver]
[Hkey_classes_root.htmopenwithlistdreamweavershell]
[Hkey_classes_root.htmopenwithlistdreamweavershelledit]
[Hkey_classes_root.htmopenwithlistdreamweavershelleditcommand]
@= "" "C:Program filesmacromediadreamweaver 4dreamweaver.exe" "%1" "
21, set the dotted line of the table.
Method One: Make a 1x2 diagram. Half black and half white, then use the form to make line.
Method Two: In the CSS inside set, want to IE5. 5 only supports this effect.
Style= "Border-left: #000000 1PX dashed; Border-right: #000000 1PX dashed; Border-top: #000000 1PX dashed; Border-bottom: #000000 1PX Dashed "
22, see the effect of calling the Hhctrl control in a Web page.
The code is as follows:
〈object id= "HHC" type= "Application/x-oleobject" classid= "Clsid:adb880a6-d8ff-11cf-9377-00aa003b7a11" 〉〈/object〉〈 SCRIPT〉HHC. TextPopup ("Haha, hello, I am a flash dream!", "", 50,5,128255,346751); 〈/script〉
22, how to make a picture has a shallow to deep gradient.
〈script language=javascript1.2〉
〈!--
function High (WHICH2) {
Theobject=which2
Highlighting=setinterval ("Highlightit (Theobject)", 50)
}
function Low (WHICH2) {
Clearinterval (highlighting)
Which2.filters.alpha.opacity=40
}
function Highlightit (CUR2) {
if (cur2.filters.alpha.opacity〈100)
cur2.filters.alpha.opacity+=10
else if (window.highlighting)
Clearinterval (highlighting)
}
〈/script〉
〈img Onmouseout=low (This) Onmouseover=high (this) style= "Filter:alpha (opacity=40)" src= "http://www.webjx.com/ Htmldata/2005-09-21/logo.gif "
23, double-click the left mouse button to scroll the background, click Stop.
〈script language=javascript〉
var Currentpos,timer;
Function Initialize ()
{
Timer=setinterval ("ScrollWindow ()", 16);
}
function SC () {
Clearinterval (timer);
}
function ScrollWindow ()
{
Currentpos=document.body.scrolltop;
Window.Scroll (0,++currentpos);
if (Currentpos!= document.body.scrollTop)
SC ();
}
Document.onmousedown=sc
Document.ondblclick=initialize
〈/script〉
24, how to set the style of different text link effects on the same page.
The code is as follows:
〈html〉〈head〉〈title〉 How to set styles for different text link effects on the same page 〈/title〉
〈meta http-equiv= "Content-type" content= "text/html; charset=gb2312 "
〈style type= "Text/css"
〈!--
a:hover {font-size:9pt; color: #FF0000; Text-decoration:underline}
a:link {font-size:9pt; color: #006699; Text-decoration:underline}
a:visited {font-size:9pt; color: #006699; Text-decoration:underline}
a:active {font-size:9pt; color: #FF0000; Text-decoration:none}
a.r1:hover {font-size:9pt; color: #FF0000; text-decoration:underline overline}
a.r1:link {font-size:9pt; color: #000000; text-decoration:underline overline}
a.r1:visited {font-size:9pt; color: #99CC00; text-decoration:underline overline}
a.r1:active {font-size:9pt; color: #000000; text-decoration:underline overline}
--〉
〈/style〉
〈/head〉
〈body bgcolor= "#FFFFFF" text= "#000000"
〈a href= "#" Underline link 〈/a〉
〈p〉〈/p〉
〈a href= "#" class= "R1" double underline link 〈/a〉
〈/body〉
〈/html〉
Supplementary Note:
A:hover represents an outdated style of the mouse.
A:link represents the style of the link.
A:active represents the style of the currently active connection.
A:visited represents the style of a connection that has been accessed.
25, with CSS to add shadow effect and text stroke effect.
. glow{font-size:9pt; Filter:glow (color= #000000, Strength=1)}
Text Stroke effect
. shadow {font-size:9pt; Filter:dropshadow (Offx=1, Offy=1, DropShadow (offx=1, Offy=1, color: #111111); COLOR: #ffffff; font-family: "Song Body"}
Add Shadow Effect
Supplementary Note:
Both of these filters must be added to the 〈TD Class=glow or shadow〉〈div〉xxxxxxxxx〈/div〉〈/td〉 to achieve the effect.
, and there is enough room to display shadows or strokes, or half of the shadow or stroke occurs.
26, how to do with a color pull-down menu.
〈select style= "font-size:10px; COLOR: #ffffff; Font-family:verdana; Background-color: #ff6600; "size=1〉
〈option selected〉:: Dreamweaver4:: 〈/option〉
〈option〉::flash5::〈/option〉
〈option〉::firewoks4::〈/option〉
〈/select〉
27, about the bright and dark border issues in the DW4 table.
The DW4 table panel does not have a light border and a dark border property setting, because NC is not supported, only you add it in your code.
bordercolorlight= "#999999" bordercolordark= "#000000"
You can also use CSS to define a class. For example:
〈style〉
. bordercolor {bordercolorlight: #999999; Bordercolordark: #000000}
〈/style〉
Then add the lt;table class= "BorderColor" in the form you want to add the effect to.
28, automatically displays the date the home page was last updated.
〈script〉
document.write ("Last update:" +document.lastmodified+ ")
〈/script〉
29. How do I make the scroll bar appear on the left?
I think actually in the forum someone published this code, very interesting, it does take care of some left-handed, hehe!
〈html dir= "RTL"
〈body bgcolor= "#000000" text= "#FFFFFF"
〈table height=18 width=212 align=center bgcolor= #FFFFFF dir= "ltr" cellspacing= "1" cellpadding= "0"
〈tr〉
〈TD bgcolor= "#FF0000" is your scroll bar on the left? 〈/td〉
〈/tr〉
〈/table〉
〈/body〉
〈/html〉
30, how to add a small icon in front of the URL?
First, you must understand that the so-called icon is a special graphics file format, which is an. ico extension. You can find a software for making icons on the Internet, which has specific specifications: the size of the icon is 16 * 16 (in pixels), and the color must not exceed 16 colors. In the head section of the page file, add the following: 〈link rel= "shortcut icon" href= "http://www.webjx.com/icon filename", and placed in the root directory of the page.
31, in the 800*600 Monitor, how to not let the page horizontal scroll bar!
Set to 〈body leftmargin= "0" topmargin= "0", the table width in the Web page is 778.
32, about! Explanation of Dotype〉 's explanations.
In the Web page, you will often see! DOCTYPE HTML public '-//w3c//dtd HTML 4.01//en ' is the version information that declares the HTML file.
33, use the picture to close the form.
〈a href= "Java script:window.close ()" 〉〈img height=20 width=20-alt= "Close window" src= "http://www.webjx.com/htmldata/ 2005-09-21/close.gif "border=0〉〈/a〉
Supplementary note: How to use the activex! , no more warning windows?
〈html〉
〈head〉
〈object id=closes type= "Application/x-oleobject"
Classid= "Clsid:adb880a6-d8ff-11cf-9377-00aa003b7a11"
〈param name= "Command" value= "Close" 〉〈/object〉
〈/head〉
〈body bgcolor= "#003063" text= "#ffffff" Id=all〉〈a href= "#" close the window without prompting 〈/a〉
〈/body〉
〈/html〉
34, disable the right mouse button to view the Web page source code.
〈script language=javascript〉
function Click ()
{if (event.button==2) {alert (' Hello, welcome! `) }}
Document.onmousedown=click
〈/script〉
Supplementary Note:
The mouse is completely blocked, you can screen the right mouse button and Web text.
〈body oncontextmenu= ' return false ' ondragstart= ' return false ' onselectstart= ' return false '
35, through the button to view the Web page source code.
〈input type= "button" value= "View Source code" onclick= ' window.location = "View-source:" + window.location.href ' name= ' button "
36. How to implement the button's submit function with text connection?
〈a href= "#" 〉ok〈/a〉
This text should be placed in the form. FormName is the Name,〈form name=form111〉 here to be written in the form so it should be form111.submit ()
37, how to make an empty link?
Add
38, use 〈iframe〉 to insert pages into the Web page.
Often I see a lot of Web pages have a Web page, but also thought to be using the framework, is not, it is used 〈iframe〉, it is only applicable to Ie,ns but does not support 〈iframe〉, but the surrounding words only when the browser does not support the IFRAME tag will be displayed, such as 〈noframes〉 , you can put some kind of warning words.
You pay attention! Below please and I learn its usage.
Analysis code: 〈iframe src= "iframe.html" name= "test" align= "Middle" width= "1" height= "marginwidth=" marginheight= "1" Frameborder= "1" scrolling= "Yes" 〉〈/iframe〉
Src= "Iframe.html"
Used to display the source of the Web page in 〈iframe〉, plus a relative or absolute path.
Name= "Test"
This is required for the target parameter of the link tag.
Align= "Middle"
The optional value is left, right, top, middle, bottom, not very useful.
Width= "height=" "100"
The width and length of the frame window are in pixels units.
Marginwidth= "1" marginheight= "1"
The space that is reserved for the inserted file and the box edge.
Frameborder= "1"
Use 1 to show the border, and 0 not to display it. (Can be yes or no)
Scrolling= "Yes"
Use Yes to allow scrolling (default), no does not allow scrolling.
39, may I know the usage of ?
Tbody usage is said to enhance the control of the form. For example:
〈table〉〈tbody〉........〈/tbody〉〈/table〉
Tbody code if you're not using your handwriting, save it as a IE5 when you open a page with a
, your saved file will generate Tbody code in the table. (Even if your form doesn't have a
Tbody code, the IE5 will also be generated when you save it.
40,alt and title are all indicative language tags, notice the difference between them.
When we browse the page, when the mouse hovers over the picture object or the text link, in the lower right corner of the mouse, sometimes a message box appears. Make a note of the target. On some occasions, its role is very important.
ALT is used to tip the picture. Title used to give link text or plain text hints.
Usage is as follows:
〈p title= "To link text hint" text 〈/p〉
〈a href= "#" title= "to link text hint" text 〈/a〉
〈img src= "http://www.webjx.com/htmldata/2005-09-21/picture. gif" alt= "Give picture Hints"
Supplementary knowledge: How to 〈title〉〈alt〉 inside how many lines to change lines? Enter a return in the source code.
〈a href= "#" title= "personal resume
Name: Zhang Pei
NET name: I am the dream of flash
Sex: Male, not female.
Hobbies: Web production, software development "" Personal resume 〈/a〉
For example: Personal resume
41, use JavaScript code to implement the flashing button.
〈body〉
〈form method= "POST" action= "--webbot-self--"
〈input type= "button" name=sub value= "flashing id=flashit style=" border:1px solid; Background-color: #FFFFFF "
〈/form〉
〈script〉
if (Document.all&&document.all.flashit)
{
var flashelement=document.all.flashit
if (flashelement.length==null)
Flashelement[0]=document.all.flashit
function ChangeColor (which)
{
if (flashelement[which].style.color== ' #800000 ')
Flashelement[which].style.color= "#0063A4"
Else
Flashelement[which].style.color= "#800000"
}
if (flashelement.length==null)
SetInterval ("ChangeColor (0)", 1000)
Else
for (i=0;i〈flashelement.length;i++)
{
var tempvariable= ' SetInterval ("ChangeColor (' +i+ ')", ' + ' 1000) '
Eval (tempvariable)
}
}
〈/script〉
〈/body〉
42,CSS defines a color border for a picture.
IMG {border:1px Solid red}
43, how to make the inserted flash transparent in the DW.
Method One: Select SWF, open the original Code window, before 〈/object〉 enter: 〈param name= "wmode" value= "Transparent"
Method Two: Flie→publist Settings→html→window mode selection in Flash transparent
44, in the DW edit text, how to enter a space?
The question of entering a space in DW seems to have become a cliché. You can avoid this by adjusting the input method to Full-width mode. This takes the artificial intelligence ABC as an example. Press Shift+space to switch to the Full-width state.
45, why the graphics in my DW are not displaying correctly.
The first: It may be because you define and are using a site, and your HTML file or picture is not within the area contained in this site, so Dreamweaver uses the file protocol to
Description of the absolute path of the image, unfortunately, IE does not support the use of SRC in the file protocol, so the image can not be displayed.
The second kind: May be put the picture the folder or the picture name is Chinese, also does not show the webpage to go.
46, how to test the Flash movie loading on the local machine?
I think this may be a lot of people are asking questions, in fact very simple, in test, select View-〉show streaming can be seen.
47, there are several ways to make a vertical line in a Web page.
The first method: using a pixel map of the way!
If you use the Dreamwever edit→preferences ... The spacer image in →layout view creates a pixel map file with the default name: Http://www.webjx.com/htmldata/2005-09-21/spacer.gif.
In code:
〈table border= "0" cellspacing= "0" cellpadding= "0"
〈tr〉
〈TD bgcolor= "#FF0000" height= "200" 〉〈img src= "Http://www.webjx.com/htmldata/2005-09-21/spacer.gif" width= "1" height= "1" 〉〈/td〉
〈/tr〉
〈/table〉
The second way: fill in the color of the table Method! Cut out the 〈td〉〈/td〉.
〈table border= "0" cellspacing= "0" cellpadding= "0"
〈tr〉
〈TD bgcolor= "#FF0000" height= "1" width= "〉〈/td〉"
〈/tr〉
〈/table〉
The third method: using the horizontal bar.
〈HR color= "Red" width= "1" size= "100%"
48, about mouse drag, change the layer size. --look at Microsoft's approach.
〈script〉
Document.execcommand ("2d-position", false,true);
〈/script〉
〈div contenteditable=true〉
〈div style= "width:300px; Position:absolute; height:100px; background-color:red "" Move layer 〈/div〉
〈/div〉
49, click on the connection text to add to the Favorites folder.
〈a href= "Java script:window.external.AddFavorite (http://www.webjx.com ', Web Teaching Network ')" Click Add Favorites 〈/a〉