?? 0124.htm
字號(hào):
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><!-- saved from url=(0032)http://www.ie-zone.com/index.php --><HTML><HEAD><TITLE>SplashWindow應(yīng)用</TITLE><META http-equiv=Content-Type content="text/html; charset=gb2312"><LINK href="../../fav.ico" rel="shortcut icon"><STYLE type=text/css>BODY { MARGIN: 25px 25px 25px}#all TD { FONT-SIZE: 12px; LINE-HEIGHT: 15px; FONT-FAMILY: "Verdana", "新宋體", "宋體"}INPUT { FONT-SIZE: 12px; LINE-HEIGHT: 15px; FONT-FAMILY: "Verdana", "Arial","新宋體", "宋體"}SELECT { FONT-SIZE: 12px; LINE-HEIGHT: 15px; FONT-FAMILY: "Verdana", "Arial","新宋體", "宋體"}P { FONT-SIZE: 12px; LINE-HEIGHT: 15px; FONT-FAMILY: "Verdana", "Arial","新宋體", "宋體"}TEXTAREA { FONT-SIZE: 12px; LINE-HEIGHT: 15px; FONT-FAMILY: "Verdana", "Arial","新宋體", "宋體"}#all A:active { COLOR: #7d070c}#all A:visited { COLOR: #7d070c}#all A:hover { COLOR: #336699}#all A:link { COLOR: #7d070c}</STYLE><SCRIPT language=JavaScript><!--function MM_goToURL() { //v3.0 var i, args=MM_goToURL.arguments; document.MM_returnValue = false; for (i=0; i<(args.length-1); i+=2) eval(args[i]+".location='"+args[i+1]+"'");}function JM_cc(ob){var obj=MM_findObj(ob); if (obj) { obj.select();js=obj.createTextRange();js.execCommand("Copy");}}function MM_findObj(n, d) { //v4.0 var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) { d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);} if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n]; for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document); if(!x && document.getElementById) x=document.getElementById(n); return x;}//--></SCRIPT><META content="MSHTML 5.50.4134.600" name=GENERATOR></HEAD><BODY id=all text=#000000 bgColor=#336699><TABLE cellSpacing=0 cellPadding=0 width="100%" border=0> <TR bgColor=#ffffff> <TD><IMG src="../images/sq_1.gif" width=11 height="14"></TD> <TD width="100%"></TD> <TD><IMG src="../images/sq_2.gif" width=11 height="14"></TD> </TR></TABLE><TABLE cellSpacing=0 cellPadding=0 width="100%" border=0> <TR bgColor=#ffffff> <TD><IMG src="../../images/space.gif" width=11 height="1"></TD> <TD width="100%"> <table width="100%" border="0" cellpadding="8"> <tr> <td align="center"> <script language="JavaScript">document.write("<font color=#7d070c style=\"font-size: 14px\">"+document.title+"</font>");</script> </td> </tr> <tr> <td bgcolor="#f7f7f7"> <script language="JavaScript"> function sWin(url){ splashWin = window.open(url, 'tip', 'fullscreen=1,toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0' ); splashWin.resizeTo (300,200); splashWin.moveTo(300,150); }</script> 今天在Jet的網(wǎng)站<a href="../../../jet.cnnf.net/index.html" target="_blank">[織夢(mèng)地帶]</a>看到一個(gè)很Cool的SplashWindow, 那今天我們就來(lái)講講這個(gè)SplashWindow .[程序不是小人寫(xiě)的,我是抄的~ :) 資源共享嘛~ ]<br> <input type="button" name="Button2" value="點(diǎn)這里看看什么是SplashWindow窗口" onClick=sWin('e12221021.htm') > <font color="#990000"> 轉(zhuǎn)載講解請(qǐng)注明</font> <font color="#990000"> 無(wú)憂(yōu)腳本 51JS.COM</font> [網(wǎng)站新建立要靠這來(lái)添加人氣羅~:)]<br> <br> <img src="img/step.gif" width="30" height="30"> <b>使用說(shuō)明與簡(jiǎn)單實(shí)現(xiàn):</b>一般的,瀏覽器并不允許設(shè)計(jì)者打開(kāi)一個(gè)沒(méi)邊框與標(biāo)題欄的窗口,但當(dāng)你生成一個(gè)全屏的窗口時(shí)<a href="../example/fullscreen/index.htm" target="_blank">[如何生成一個(gè)全屏的窗口?]</a>并不帶有邊框與標(biāo)題欄,這時(shí)我們就可以利用重新設(shè)定窗口的大小來(lái)獲得此效果,如下打開(kāi)新全屏幕的代碼為:<br> <table width="100%" border="0" cellspacing="5" cellpadding="0" bgcolor="#dddddd"> <tr> <td>var splashWin = window.open(URL, name,<br> "fullscreen=1,toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0")</td> </tr> </table> <br> 通過(guò)上面這段代碼我們可以打開(kāi)一個(gè)新的全屏窗口,現(xiàn)在我們可以通過(guò) resizeTo與moveTo來(lái)改變窗口的屬性<br> <table width="100%" border="0" cellspacing="5" cellpadding="0" bgcolor="#dddddd"> <tr> <td>splashWin.resizeTo(width, height);<br> splashWin.moveTo(left, top);</td> </tr> </table> <br> 現(xiàn)在你已經(jīng)可以生成SplashWindow了,但并不能拖動(dòng),但請(qǐng)別心急~~:)我們先來(lái)看看第一步完整的實(shí)現(xiàn)代碼:<br> <table width="100%" border="0" cellspacing="5" cellpadding="0" bgcolor="#dddddd"> <tr> <td>function sWin(url){<br> splashWin = window.open(url, 'tip', 'fullscreen=1,toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0' );<br> splashWin.resizeTo <font color="#990000">(300,200</font>);//你可以自由修改SplashWin的初始位置<br> splashWin.moveTo(<font color="#990000">300,150</font>);<br> } </td> </tr> </table> <br> 最后調(diào)用 sWin('test.htm') 看看效果:)別忘記在test.htm內(nèi)加入<body <font color="#990000">scroll=no</font>.....>啊~; <p><img src="img/step2.gif" width="30" height="30"> <b>為SplashWin添加可拖動(dòng)屬性: </b>通過(guò)第一步你是否覺(jué)得還差點(diǎn)東西呢?讓我們來(lái)為它加上可拖動(dòng)的屬性,這里我們使用了Dhtml Lib中的一個(gè)Genmove的腳本來(lái)幫助我們實(shí)現(xiàn)此功能.<a href="js/move.js" target="_blank">[點(diǎn)這里下載 Genmove.js] </a><br> 在頁(yè)面<font color="#990000">[注:此頁(yè)面是指新打開(kāi)的頁(yè)面即上方window.open中url頁(yè)面]</font>中加入下面這段代碼引入Genmove. <table width="100%" border="0" cellspacing="5" cellpadding="0" bgcolor="#dddddd"> <tr> <td><script language="JavaScript" src="move.js"></script></td> </tr> </table> <br> 對(duì)于新頁(yè)面首先請(qǐng)?jiān)O(shè)置頁(yè)面的<body>如下 <table width="100%" border="0" cellspacing="5" cellpadding="0" bgcolor="#dddddd"> <tr> <td><body bgcolor="#FFFFFF" text="#000000" <font color="#990000">scroll=no leftmargin="0" topmargin="0" marginwidth="0" marginheight="0"</font>></td> </tr> </table> <br> 如何使用Genmove?請(qǐng)先為你的頁(yè)面添加一個(gè)層,下面列出例子中使用源代碼.<br> <table width="100%" border="0" cellspacing="5" cellpadding="0" bgcolor="#dddddd"> <tr> <td><div id="<font color="#990000">Layer1</font>" style="position:absolute; left:0px; top:0px; width:300px; height:200px; z-index:1" > <br> <table width="100%" border="0" cellspacing="1" cellpadding="0" bgcolor="#000000"><br> <tr <font color="#990000">class=handle handlefor="Layer1"</font>> <!--注意:這里是生成移動(dòng)把手的,通過(guò)指定<font color="#990000">handlefor</font>來(lái)指出要移動(dòng)的層 --><br> <td bgcolor="#FF9900"><br> <table width="100%" border="0" cellspacing="5" cellpadding="0"><br> <tr><br> <td>無(wú)憂(yōu)腳本 51JS.COM</td><br> <td align="right"> <a href="####"><img src="imgs/close.gif" width="12" height="12" onClick=window.close() border="0" alt="點(diǎn)這里關(guān)閉此窗口"></a></td><br> </tr><br> </table><br> </td><br> </tr><br> <tr><br> <td bgcolor="#eeeeee" height="170" <font color="#990000">id=content</font>> <!-- 這里的<font color="#990000">content</font>是為下一步添加小把戲而用的 --><br> <table width="100%" border="0" cellspacing="5" cellpadding="0"><br> <tr><br> <td>你可以任意拖動(dòng)此窗口,注意此視窗并非用層生成,其實(shí)現(xiàn)主要是利用改變?nèi)链翱诘拇笮《淖兊模虼诉@是一個(gè)全新的窗口,通過(guò)分析源代碼你可以發(fā)現(xiàn)其打開(kāi)方式同樣是使用到Window.open,關(guān)于如何生成?請(qǐng)查看教程與使用步驟.</td><br> </tr><br> </table><br> </td><br> </tr><br> </table><br> </div></td> </tr> </table> <img src="img/step3.gif" width="30" height="30"> <b>錦上添花:</b>習(xí)慣使用window的人都知道活動(dòng)的窗口與非活動(dòng)的窗口是有分別的,那就讓我們加上這點(diǎn)分別:<font color="#990000">[本例簡(jiǎn)單改變內(nèi)容的底色,當(dāng)然你也可以加其它的花啦~]<br> </font>我已把功能內(nèi)嵌到<a href="js/move.js" target="_blank">Genmove.js</a>內(nèi)了,你可以查看源代碼看看加了什么語(yǔ)句,很簡(jiǎn)單的!但你還需要在你的頁(yè)面內(nèi)添加下面的代碼<br> <table width="100%" border="0" cellspacing="5" cellpadding="0" bgcolor="#dddddd"> <tr> <td><style type="text/css"><br> <!--<br> .hi { background-color: #FFFFFF} --><br> </style></td> </tr> </table> <p><img src="img/step4.gif" width="30" height="30"> <b>OK了:</b>使用愉快~~ :)</p> </td> </tr> <tr> <td><br> </td> </tr> </table> </TD> <TD><IMG src="../../images/space.gif" width=11 height="1"></TD> </TR></TABLE><TABLE cellSpacing=0 cellPadding=0 width="100%" border=0> <TR bgColor=#ffffff> <TD><IMG src="../images/sq_3.gif" width=11 height="14"></TD> <TD width="100%"></TD> <TD><IMG src="../images/sq_4.gif" width=11 height="14"></TD> </TR></TABLE></BODY></HTML>
?? 快捷鍵說(shuō)明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -