Monday, October 5, 2009

Dreamweaver commonly used code

Is 1. control transverse with fore-and-aft scroll show hidden from view?
<body Style="overflow-y:hIdden ">Axis of take out X
<body Style="overflow-x:hIdden ">Axis of take out Y
<body Scroll="no"> is not shown

--------------------------------------------------------------------------------
 2. form becomes angry
<TD Onmouseover="this.style.backgroundColor='#FFFFFF' "Onmouseout="this.style.backgroundColor='' "Style="CURSOR: Hand ">
--------------------------------------------------------------------------------
 3. prohibits duplicating, the mouse procrastinates move choose
<body Ondragstart=window.event.returnValue=false Oncontextmenu=window.event.returnValue=false Onselectstart=event.returnValue=false>
--------------------------------------------------------------------------------
 Page of 4. common Iframe
<iframe Name="name" Src="main.htm" Width="450" Height="287" Scrolling="Auto" Frameborder="0"></iframe>

--------------------------------------------------------------------------------
 5.iframe gets used to height oneself
<iframe Name="pindex" Src="index.asp" Frameborder=false Scrolling="auto" Width="100%" Height="100%" Frameborder=no Onload="document.all['pindex'].style.height=pindex.document.body.scrollHeight" ></iframe>
--------------------------------------------------------------------------------
 The icon & that oneself change before 6.IE address column can show your icon in the favorite
<link Rel="Shortcut Icon" Href="favicon.ico">
<link Rel="Bookmark" Href="favicon.ico ">
--------------------------------------------------------------------------------
 7. name shrinks put
More and more people's long bubble net, the popularity rate of glasses is higher and higher also, make a character bit bigger, those who let more users look is clearer.
<script Type="text/javascript">Function DoZoom(size)
{document.getElementById('zoom').style.fontSize=size+'px';}
</script>
<span Id="zoom"> needs to appoint the literal </span> of size
<a Href="javascript:dOZoom(16)"> big </a><a Href="javascript:dThe </a in OZoom(14)">><a Href="javascript:dOZoom(12)"> small </a>
--------------------------------------------------------------------------------
 8. jumps simply turn webpage code
If you want,jump turn, such code can add in the <head></head> part of Html code:
<meta Http-equiv="refresh" Content="3; Url=http://www.devdao.com ">
--------------------------------------------------------------------------------
 9.iframe(is embedded frame) get used to height oneself
The built-in address that fill in must be in with this page same on the site, can hint otherwise " reject a visit! " . Have attributive problem to crossing region to cite, consult please other data.
<iframe Name="guestbook" Src="gbook/index.asp" Scrolling=no Width="100%" Height="100%" Frameborder=no Onload="document.all['guestbook'].style.height=guestbook.document.body.scrollHeight"></iframe>
--------------------------------------------------------------------------------
 10. jumps turn menu new window
<select Name="select" Onchange="window.open(this.options[this.selectedIndex].value)">
<option Value="http://www.microsoft.com/ie ">Internet Explorer</option>
<option Value="http://www.microsoft.com ">Microsoft Home</option>
<option Value="http://msdn.microsoft.com ">Developer Network</option>
</select>
--------------------------------------------------------------------------------
 11.flash transparent option
<param Name="wmode" Value="transparent ">
--------------------------------------------------------------------------------

 12. is added to the favorite to mix set for home page
<a Href=# Onclick="this.style.behavior='url(#default#homepage)';this.setHomePage('http://www.devdao.com');"> is set for home page </a>

<a Href="javascript:wIndow.external.AddFavorite('http://www.devdao.com/' , ' stationmaster designs net ')"> to collect this station </a>


--------------------------------------------------------------------------------
 Alter time what 13. is recorded and show a webpage finally
<script Language=JavaScript>Document.write(" updates time finally: "+ Document.lastModified + "" )
</script>
--------------------------------------------------------------------------------
 14. festival times
<Script Language="JavaScript ">
Var Timedate= New Date("October 1, 2002");
National Day "; of Var Times= "
Var Now = New Date();
Var Date = Timedate.getTime() - Now.getTime();
Var Time = Math.floor(date / (1000 * 60 * 60 * 24));
If (time >= 0)
Document.write(" still has from "+times+" now: "+ " of Time +" day)
</Script>
--------------------------------------------------------------------------------
 15. is added in HEAD
Prohibit cache
<meta Http-equiv="Expires" CONTENT="0 ">
<meta Http-equiv="Cache-Control" CONTENT="no-cache ">
<meta Http-equiv="Pragma" CONTENT="no-cache ">

--------------------------------------------------------------------------------
 16. makes the setting of the documentation inside IFRAME frame transparent
<iframe Src="about:&Lt;body Style='background:tRansparent'>" Allowtransparency></iframe>
--------------------------------------------------------------------------------
 17. opens the window namely the biggest change
<script Language="JavaScript ">
< ! - - BeginSelf.moveTo(0, 0)Self.resizeTo(screen.availWidth, screen.availHeight)
/ / End- ->
</script>
--------------------------------------------------------------------------------
 18. joins background music
<bgsound Src="mid/windblue[1].mid" Loop="-1 ">Apply to IE only
<embed Src="music.mid" Autostart="true" Loop="true" Hidden="true ">To Netscape, IE is applicable
--------------------------------------------------------------------------------
 19. scroll
Information of scroll of <marquee Direction=up Height=146 Onmouseout=start() Onmouseover=stop() ScrollAmount=2>
</marquee>
--------------------------------------------------------------------------------
 When 20. prevents to click empty link, page often replacement arrives page head end
Code " Javascript:vOid(null) " replace original " # " mark
--------------------------------------------------------------------------------

 21. character or picture play a window that specifies size
Join in Body
<script Language="JavaScript" Type="text/JavaScript">Function MM_openBrWindow(theURL, winName, features) {window.open(theURL, winName, features);}
</script>
Play a code
<a Href="#" Target="_self" OnClick="MM_openBrWindow('windows01.htm' , '' , 'width=550, picture of Height=380')" Width="550" Height="380" Border="0"> or literal </a>


--------------------------------------------------------------------------------
 22. jumps turn page code
<meta Http-equiv="refresh" Content="5;url=http://www.devdao.com ">
--------------------------------------------------------------------------------
 Line of 23. filament space
<hr Noshade Size=0 Color=#C0C0C0>
--------------------------------------------------------------------------------
 The automatic line feed in 24. webpage
<td Style="word-break:bReak-all"> is done decided.
Complete isStyle="table-layout: Fixed;WORD-BREAK: Break-all; WORD-WRAP: Break-word "
--------------------------------------------------------------------------------
 25. removes the image tool hurdle that Ie6 appears automatically, setting GALLERYIMG attribute is False or No.
<IMG SRC="mypicture.jpg" HEIGHT="100px" WIDTH="100px" GALLERYIMG="no ">
--------------------------------------------------------------------------------
 26. prohibits page text content is chosen
<body Oncontextmenu="return False" Ondragstart="return False" Onselectstart ="return False" Onselect="document.selection.empty()" Oncopy="document.selection.empty()" Onbeforecopy="returnFalse"onmouseup="document.selection.empty() ">

--------------------------------------------------------------------------------
 27. cannot nod right key, need not CTRL+A, cannot duplicate!
<body Oncontextmenu="window.event.returnValue=false "Onkeypress="window.event.returnValue=false "Onkeydown="window.event.returnValue=false "Onkeyup="window.event.returnValue=false "Ondragstart="window.event.returnValue=false "Onselectstart="event.returnValue=false ">
</body>
--------------------------------------------------------------------------------
 28.IE browser supports Bgproperties of attribute of a Body, it can let setting do not roll:
" Bgproperties="fixed of file of <Body Background=" picture ">
--------------------------------------------------------------------------------
 Picture of background of 29. random commutation (can the specially good effect of refresh mood)
<Script Language="JavaScript ">
Image = New Array(4); // defines Image to be the array of picture amount
The method of picture of background of Image [0] = 'tu0.gif' //
Image [1] = 'tu1.gif'
Image [2] = 'tu2.gif'
Image [3] = 'tu3.gif'
Image [4] = 'tu4.gif'
Number = Math.floor(Math.random() * Image.length);
Document.write("<BODY BACKGROUND="+image[number]+">");
</Script>

--------------------------------------------------------------------------------
 30. picture expresses single button
<form Id="form1" Name="form1" Method="post" Action="">
<img Src="login.gif" Width="62" Height="22" Onclick="document.form1.submit()" />
</form>
--------------------------------------------------------------------------------
 31. controls the CSS of shadow setting to define a methodBody {Text-align:cEnter;Background-repeat: Repeat-y;Background-position: Center;Background-image: Url(. . / Images/bg.jpg);
}
--------------------------------------------------------------------------------
 32. has delimited link hand-type mouseStyle="cursor:hAnd "
--------------------------------------------------------------------------------
 How does 33. shut a layer
<div Id="Layer1"></div>
<a Href="#" OnClick="Layer1.style.display='none'"> shuts a </a>
--------------------------------------------------------------------------------
 34. shuts the script of the window
<a Href=javascript:cLose()>[closes the window] </a>
--------------------------------------------------------------------------------
 35. if the character is too chief, turn too long part into suspension points to show
<DIV STYLE="width: 120px; Height: 50px; Border: 1px Solid Blue;overflow: Hidden; Text-overflow:eLlipsis ">
<NOBR> has word of one style or manner of writing for instance namely, very long, the group inside form shows no less than. </NOBR>
</DIV>
--------------------------------------------------------------------------------
 After 36. enters a homepage automatic the biggest change
<script>Self.moveTo(0, 0)Self.resizeTo(screen.availWidth, screen.availHeight)
</script>

--------------------------------------------------------------------------------
 37. caves character
<div Style="width:300px;padding:20px;overflow:hIdden;word-wrap:bReak-word;word-break:bReak:aLl; Font-size:12px; Line-height:18px; Background-color:#Eeeeee;">
<font Disabled>
How, am I sunken went down? <br>
Don't you want to try? <br>
<a Href="www.devdao.comHttp://www.devdao.com/">www.devdao.com</a></font>
</div>
--------------------------------------------------------------------------------
 38. runs code circle
<script>Function Preview()
{var TestWin=open('');
TestWin.document.write(code.value);}
</script>
<textarea Id=code Cols=60 Rows=15></textarea>
<br>
<button Onclick=Preview() > runs </button>
--------------------------------------------------------------------------------

 38. becomes a link to form
<table Width="100%" Onclick="window.open('http://www.devdao.com/' , '_blank')" Style="CURSOR:hAnd">
<tr>
<td Height="100" Bgcolor="f4f4f4"> </td>
</tr>
</table>


--------------------------------------------------------------------------------
 39. lets play a window always is uppermost face
<body Onblur="this.focus(); ">
--------------------------------------------------------------------------------
 40.CSS character shadow
.shadowfont{FILTER: Dropshadow(color=#666666, offx=1, offy=1, positive=1); FONT-FAMILY: ""; FONT-SIZE of body of the Song Dynasty: 9pt;COLOR: #ffffff;}
--------------------------------------------------------------------------------
 41. regressive & closes the window
Regressive: Javascript:hIstory.back(1)
Shut: Javascript:wIndow.close();
--------------------------------------------------------------------------------
 42. form is transparentStyle="FILTER: Alpha(opacity=72) "
--------------------------------------------------------------------------------
 How does 43. avoid others to put your webpage in frame
<script Language= " Javascript " > < ! - - If (self! =top){top.location=self.location;}- - ></ Script>
--------------------------------------------------------------------------------
 The distinction of 44.Alt and TitleAlt uses a picture to hint. Title uses character or clew of common written language.

<a Href="#" Title=" gives a link </a> of character of literal clew ">
<p Title=" gives a link </p> of character of literal clew ">

<img Src=" picture links " Alt=" to give a picture clew ">

--------------------------------------------------------------------------------
 The attune of all 45. Javascript exhausts the quantity is adopted exterior call
<SCRIPT LANGUAGE="javascript" SRC="js/xxxxx.js"></SCRIPT>
--------------------------------------------------------------------------------
 46. is linkedResponse.redirect"login.asp "Location.href="xx.asp "OnClick="window.location='login.asp' "OnClick="window.open('') "

--------------------------------------------------------------------------------

 47. links a type basicallyA:lInk shows the pattern of the linkA:aCtive shows pattern of current activity connectiveA:hOver states the mouse delimits antiquated styleA:vIsited shows the connective pattern that has visited

"Link-visited-hover-active" brief write down for "lvha" namely "love"+"hate "

--------------------------------------------------------------------------------
 48. installs different written language to link the type of the effect in same page
<style Type="text/css">
.green {COLOR: #309633}
.green A:lInk {COLOR: #309633; TEXT-DECORATION: None}
.green A:vIsited {COLOR: #309633; TEXT-DECORATION: None}
.green A:hOver {COLOR: #309633; TEXT-DECORATION: Underline}
.green A:aCtive {COLOR: #309633; TEXT-DECORATION: None}
</style>
</a> of character of <a Href="#" Class="green">

--------------------------------------------------------------------------------
 Pull below 49. jump turn menu
<select Name=select Onchange="javascript:wIndow.open(this.options[this.selectedIndex].value)"style="color:#333">
<option>----Ask a choice----</option>
<option Value="http://www.devdao.com"> stationmaster designs net </option>
<option Value="FontHttp://www.fontchina.cn/">Font</option>
</select>
--------------------------------------------------------------------------------
 50.select holds off the means of settlement of Div
The code below is joined in Div, it is OK to be adjusted according to need.
<iframe Src="javascript:fAlse" Scrolling="no" Frameborder="0" Style="z-index:-1;position:aBsolute; Top:5Px; Left:2Px;width:168;height:100px;">
</iframe>

--------------------------------------------------------------------------------
 All link of 51. full page _blank new window is opened

<base Target="_blank">

No comments:

Post a Comment