按键盘上方向键 ← 或 → 可快速上下翻页,按键盘上的 Enter 键可回到本书目录页,按键盘上方向键 ↑ 可回到本页顶部!
————未阅读完?加入书签已便下次继续阅读!
lastCharPos theBigCookie。indexOf(';'; firstCharPos);
if(lastCharPos 1) lastCharPos theBigCookie。length;
//Return thevalue。
return theBigCookie。substring(firstCharPos; lastCharPos);
}
else
{ return false;}
}
thev1getCookieVal('v1') // read
thev2getCookieVal('v2') // read
105;Q:电子邮件表单提交的问题
A:首先必需正确配置邮件客户端(Outlook Express 等)的帐户设置,这样,如果点按表单下的“提交”按钮,浏览器就会自动启用它发送邮件。目前,Foxmail 尚不支持这种电子邮件表单提交。
106;Q:用代码构造自己的窗口[奇书网Jar电子书下载乐园—QiSuu。Com]
A:
function xwindow(w;h;x;y;title;color;bordercolor;url)
{
move_function〃var isinitfalse;r〃;
move_function+〃var mywindowoktrue;r〃;
move_function+〃function mouseSTATUS() {r〃;
move_function+〃this。x null;r〃;
move_function+〃this。y null;r〃;
move_function+〃this。bt 'up';r〃;
move_function+〃this。oldx null;r〃;
move_function+〃this。oldy null;r〃;
move_function+〃this。dx null;r〃;
move_function+〃this。dy null;r〃;
move_function+〃this。screeny null;r〃;
move_function+〃this。screenx null;r〃;
move_function+〃this。element null;r〃;
move_function+〃this。event null;r〃;
move_function+〃}r〃;
move_function+〃var mouse new mouseSTATUS();r〃;
move_function+〃function actualizateMouseSTATUS(e) {r〃;
move_function+〃if (e) var e eventr〃;
move_function+〃if ((e。type'mousedown' || e。type'mouseup') && e。button1) return truer〃;
move_function+〃var xe。x+document。body。scrollLeftr〃;
move_function+〃var ye。y+document。body。scrollTopr〃;
move_function+〃mouse。xx;r〃;
move_function+〃mouse。yy;r〃;
move_function+〃if (e。type'mousedown') mouse。bt 'down';r〃;
move_function+〃else if(e。type'mouseup') mouse。bt 'up';r〃;
move_function+〃if(window。event) {r〃;
move_function+〃mouse。screenxwindow。event。screenX;r〃;
move_function+〃mouse。screenywindow。event。screenY;r〃;
move_function+〃} else {r〃;
move_function+〃mouse。screenx0;r〃;
move_function+〃mouse。screeny0;r〃;
move_function+〃}}r〃;
move_function+〃function initMouseEvents() {r〃;
move_function+〃document。onmousedown actualizateMouseSTATUSr〃;
move_function+〃document。onmousemove actualizateMouseSTATUSr〃;
move_function+〃document。onmouseup actualizateMouseSTATUSr〃;
move_function+〃document。onselectstart selectstartr〃;
move_function+〃document。ondragstart new Function('actualizateMouseSTATUS(event); return false;')r〃;
move_function+〃}r〃;
move_function+〃function selectstart(){r〃;
move_function+〃if ( event。srcElement。tagName 'TEXTAREA') { return false; } r〃;
move_function+〃else { mouse。bt'up'; return true; }r〃;
move_function+〃}r〃;
move_function+〃initMouseEvents()r〃;
move_function+〃var mywindowbt 'up';r〃;
move_function+〃var wincloseSTATUS'up';r〃;
move_function+〃var ofx0;r〃;
move_function+〃var ofy0;r〃;
move_function+〃var opx0;r〃;
move_function+〃var opy0;r〃;
move_function+〃var px0;r〃;
move_function+〃var py0;r〃;
move_function+〃var wclosechanged false;r〃;
move_function+〃function initToMoveWin() {r〃;
move_function+〃if(mouse。y 1 && mywindowbt 'up' && mouse。bt 'up') { mywindowbt 'over' }r〃;
move_function+〃 else if (( mouse。y 》 22 || mouse。y 《 1 ) && mywindowbt 'over' && mouse。bt 'up') { mywindowbt 'up'}r〃;
move_function+〃 else if (mouse。y 1 && mywindowbt 'over' && mouse。bt 'down' ) { r〃;
move_function+〃self。window。focus();r〃;
move_function+〃 ofx mouse。x;r〃;
move_function+〃 ofy mouse。y;r〃;
move_function+〃 opx mouse。x;r〃;
move_function+〃 opy mouse。y;r〃;
move_function+〃 mywindowbt'down';r〃;
move_function+〃}r〃;
move_function+〃 else if ( mouse。bt 'up' && mywindowbt 'down' ) { 〃;
move_function+〃 mywindowbt'up';〃;
move_function+〃 ofx0;〃;
move_function+〃 ofy0;〃;
move_function+〃 opx0; 〃;
move_function+〃 opy0;〃;
move_function+〃 }〃;
move_function+〃 else if ( mywindowbt 'down' && wincloseSTATUS 'up') {r〃;
move_function+〃 var m_scrx mouse。screenx;r〃;
move_function+〃 var m_scry mouse。screeny;r〃;
move_function+〃 px m_scrxofx;r〃;
move_function+〃 py m_scryofy;r〃;
move_function+〃 top。window。moveTo(px;py);r〃;
move_function+〃 }r〃;
move_function+〃 setTimeout('initToMoveWin()';1);r〃;
move_function+〃 }r〃;
move_function+〃 initToMoveWin()r〃;
newWindowwindow。open(;〃newWindow〃;〃fullscreen1〃;〃width〃+w+〃;height〃+h);
newWindow。resizeTo(w;h);
newWindow。moveTo(x;y);
newWindow。document。open();
newWindow。document。write('');
newWindow。document。write('r');
newWindow。document。write('r');
newWindow。document。write('r');
newWindow。document。write('r');
newWindow。document。write('');
newWindow。document。write('');
newWindow。document。close();
newWindow。focus();
}
//》