<html>
<head>
<title>DHTMLCentral.com - Free Dynamic HTML Scripts - WindowScript Demo</title>
<meta name="Author" content="Thomas Brattli (webmaster@dhtmlcentral.com)">
<META NAME="Generator" CONTENT="Designer:Thomas Brattli (www.bratta.com)">
<meta name="KeyWords" content="DHTML, HTML, Dynamic HTML, Javascript, Cascading Style Sheets, Cross-browser, Cross browser, Javascripts, DOM, Scripts, Free Scripts,window,dragdrop,drag,drop,minimize,maximized,layers,windows,other,">
<meta name="Description" content="Dynamic HTML Central - The ultimate place to find DHTML scripts, demos, tutorials and help.">
<style type="text/css">
.clWin{position:absolute; z-index:2; visibility:hidden; overflow:hidden; background-color:blue}
.clWindow{position:absolute; background-color:blue; overflow:hidden; z-index:15; width:200}
.clWinHead{position:absolute; width:200; top:0; font-family:arial,arial,helvetica; font-size:11px; font-weight:bold; color:white; background-color:transparent}
.clText{position:absolute; z-index:50; font-family:arial,helvetica; font-size:11px; background-color:transparent}
.clWinResize{position:absolute; z-index:30; width:30; height:30; clip:rect(0,30,30,0); background-image:url(resize.gif); layer-background-image:url(resize.gif)}
.clLogo{position:absolute}
.clUp{position:absolute; width:12; height:12; z-index:60;}
.clDown{position:absolute; width:12; height:12; z-index:60;}
.clWinButtons{position:absolute; font-family:arial,helvetica; font-size:12px}
</style>
<script language="JavaScript" src="winjs.js" type="text/javascript">
</script>
</head>
<body marginleft="0" marginheight="0">
<!-- START DELETE -->
<div style="position:absolute; left:0; top:0"><a href="#" onClick="self.close(); return false"></a></div>
<br><br><br>
<!-- END DELETE -->
<script>
win_init()
winpage=new lib_doc_size()
/*
Arguments for the AddWindow function:
heading - Heading for the window
content - The content for the window
left - The left position for the window
top - The top position for the window
width - The width of the window
height - The height of the window
bgcolor - If you want another backgroundcolor for only this window you can spesify that here
bgcoloron - If you want another active backgroundcolor for only this window you can spesify that here
There are 2 ways of adding windows.
1. Use the addWindows and send the content as a variable or as a string:
*/
//VARIABLE
cn2="<h3>标题</h3>看见了!<br><br>More content is coming right up!<br>More content is coming right up! More content is coming right up!<br><br><br>More content is coming right up! More content is coming right up!"
addWindow("Test window 2",cn2,100,100,250,300,"white","#e8e8e8")
//String - With all variables
addWindow("Test window 1","My - content - my - content - my content",300,150,100,200,"white","#e8e8e8")
</script>
<!--
2. Start the window first and then close it, that way you can have regular HTML in between.
I had to make some strange workaround to get this to work correctly in Netscape4, but it should work:
-->
<script>
//Start window
addWindow("Test window 2")
</script>
<!-- Content for the window goes in here -->
第三个窗口的内容
<script>
//End window
document.write(endWin())
//Create window (this have to be done manually. Just leave wins-1 in there)
create_window(wins-1,400,400,300,300,"white","#e8e8e8")
</script>
<script>
//Placing windows.
//setWindows()
</script>
<a href="#" onClick="setWindows(); return false">setWindows()</a>
hello
</body>
</html>
相关文件(zip):
点这儿打开