第23部分(第4/5 頁)
+ 〃path=/;〃;
document。cookie=〃v2=321;〃 + 〃path=/;〃;
}
//讀 Cookie
function getCookieVal(name)
{
var firstCharPos;lastCharPos;
var theBigCookie = document。cookie;
firstCharPos = theBigCookie。indexOf(name);
if(firstCharPos != …1)
{//skip 'name' and '='。
firstCharPos +=name。length + 1;
//Find the end of the value string (i。e。 the next';')。
lastCharPos = theBigCookie。indexOf(';'; firstCharPos);
if(lastCharPos == …1) lastCharPos = theBigCookie。length;
//Return thevalue。
return theBigCookie。substring(firstCharPos; lastCharPos);
}
else
{ return false;}
}
thev1=getCookieVal('v1') // read
thev2=getCookieVal('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 isinit=false;r〃;
move_function+=〃var mywindowok=true;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 mo
本章未完,點選下一頁繼續。