藍森林首頁 | 返回主頁 | 本站地圖 | 站內搜索 | 聯繫信箱 |
 您目前的位置:首頁 > 自由軟件 > 技術交流 > 應用編程


    

藍森林 http://www.lslnet.com 2006年8月25日 8:28

菜鳥求救∼解決不了要出人命了!(在線ing)

小第想請教一個問題,急急急∼∼
<script language="JAVASCRIPT">
<!--
function detectVersion()
{
version = parseInt(navigator.appVersion);
return version;
}

function detectOS()
{
if(navigator.userAgent.indexOf('Win') == -1) {
OS = 'Macintosh';
} else {
OS = 'Windows';
}
return OS;
}

function detectBrowser()
{
if(navigator.appName.indexOf('Netscape') == -1) {
browser = 'IE';
} else {
browser = 'Netscape';
}
return browser;
}

function FullScreen(){

var adjWidth;
var adjHeight;

if((detectOS() == 'Macintosh') && (detectBrowser() == 'Netscape')) {
adjWidth = 20;
adjHeight = 35;
}
if((detectOS() == 'Macintosh') && (detectBrowser() == 'IE')) {
adjWidth = 20;
adjHeight = 35;
winOptions = 'fullscreen=yes';
}
if((detectOS() == 'Windows') && (detectBrowser() == 'Netscape')) {
adjWidth = 30;
adjHeight = 30;
}
if(detectVersion() < 4) {
self.location.href = 'main/error.htm';
} else {
var winWidth = screen.availWidth - adjWidth;
var winHeight = screen.availHeight - adjHeight;
var winSize = 'width=' + winWidth + ',height=' + winHeight;
var thewindow = window.open('2.htm', 'WindowName', winSize);
thewindow.moveTo(0,0);
}
}

function MakeItSo(){
if((detectOS() == 'Windows') && (detectBrowser() == 'IE')) {
window.open('index.htm','windowname','fullscreen=yes');
} else {
onload=FullScreen();
}
}
-->
</script>
</<div align="center"><a herf="#" onClick="MakeItSo();">雙擊鼠標進入系統!</a></div>
上面是代碼為單獨一張頁面,通過雙擊〞雙擊鼠標進入系統!〞幾個字來實現上面一段代碼,請問能不能改動代碼,使其不需鼠標點擊,直接進入下一個頁面,且保證此段代碼效果正常實現∼∼∼∼∼∼不知道我講的意思夠不夠清楚,哪位大蝦幫忙看看∼∼∼救我一命,小弟先行謝過!!!

<body onload="MakeItSo">




Copyright © 1999-2000 LSLNET.COM. All rights reserved. 藍森林網站 版權所有。 E-mail : webmaster@lslnet.com