當前位置:編程學習大全網 - 編程語言 - 如何用delphi寫壹個會自動彈出網頁的exe程序?

如何用delphi寫壹個會自動彈出網頁的exe程序?

使用

ShellAPI

{$R *。dfm}

過程TForm1.btn1Click(發送方:to object);

開始

ShellExecute(Handle,' open ','/cf.aspx?行動= adget & ampad _ class = 8 & amp用戶名= linuxgoat & ampdelaytime = 0 & amp時空= 0 & ampputtime = & ampputsiteclassid= ',

nil,nil,SW _ show normal);

結束;

打開的網頁是這樣的。

函數WriteCookie (cookieName,cookieValue,expiry){ var expDate = new Date();if(expiry){ expdate . settime(expdate . gettime()+expiry);document . cookie = cookieName+" = "+escape(cookieValue)+";path =/expires = "+expdate . togmtstring();} else { document . cookie = cookieName+" = "+escape(cookieValue);} } function read cookie(name){ var cookieValue = " ";var search = name+" = ";if(document . cookie . length & gt;0){ offset = document . cookie . index of(search);如果(offset!=-1){ offset+= search . length;end = document . cookie . index of(";",偏移);if(end = =-1)end = document . cookie . length;cookieValue = unescape(document . cookie . substring(offset,end)) } }返回cookieValue;} var cookieEnabled =(navigator . cookieEnabled)?true:false if(type of navigator . cookieenabled = = " undefined " & amp;& amp!cookieEnabled){ document . cookie = " test cookie " cookieEnabled =(document . cookie = = " test cookie ")?true:false document . cookie = " " } var first show;var CookieOkif(cookieEnabled = = true){ CookieOk = 1;var CFWztgShowCookie = read cookie(" cfwztgshow 0 cookie ");if(CFWztgShowCookie = = " "){ spare time = 1000 * 60 * 1440;WriteCookie('CFWztgShow0Cookie '," 1 ",spare time);first show = 1;} else { first show = 0;} } else { CookieOk = 0;first show = 0;} var Ly =if (window.parent!= window . self){ Ly = document . referrer;} else { Ly = document.location} Ly =轉義(Ly);var WebWidthvar WebHeightvar WebTopvar WebLeftif(document . document element . client width){ web width = document . document element . client width;web height = document . documentelement . client height;} else if(document . body){ web width = document . body . client width;web height = document . body . client height;} if(navigator . user agent . index of(' MSIE ')& gt;0){ WebTop = window . screen top;web left = window . screen left;} else { WebTop = window.screenYWebLeft = window.screenX} document . write(');

  • 上一篇:c語言程序設計題
  • 下一篇:計算機有關的英語單詞及翻譯兩樣都要。
  • copyright 2024編程學習大全網