»ñÈ¡ÆäËü½ø³ÌÖеÄWeb BrowserÖеÄHTMLÔ´Âë
HWND H1,H2,H3,H4,hw;
H1=H2=H3=H4=hw=NULL;
H1=::FindWindow("TForm1",NULL);
if (H1) H2=::FindWindowEx(H1,NULL,"Shell Embedding",NULL);
if (H2) H3=::FindWindowEx(H2,NULL,"Shell DocObject View",NULL);
if (H3) H4=::FindWindowEx(H3,NULL,"Internet Explorer_Server",NULL);
if (H4) hw=H4;
else
{
AfxMessageBox("No Found the Dialog with IE!");
return;
}
IHTMLDocument2 *pHTMLDocument=NULL;
DWORD lRes;
HRESULT hres;
UINT MSG = RegisterWindowMessage("WM_HTML_GETOBJECT");
SendMessageTimeout(hw, MSG, 0, 0, SMTO_ABORTIFHUNG, 1000, &lRes);
hres=ObjectfromLresult(lRes,__uuidof(IHTMLDocument2),0,(void**)&pHTMLDocument);
if(hres==S_OK)
{
IPersistStreamInit *pPSI=NULL;
IStream *pStream=NULL;
HGLOBAL hHTMLText;
if (FAILED(pHTMLDocument->QueryInterface(&pPSI))) return;
hHTMLText = GlobalAlloc(GMEM_FIXED, 65534);
CreateStreamOnHGlobal(hHTMLText, TRUE, &pStream);
pPSI->Save(pStream, FALSE);
char *pText = (char*)hHTMLText;
FILE *f=fopen("data_from_explorer.txt","w");
fwrite(pText,1,strlen(pText),f);
fclose(f);
AfxMessageBox("the source codes Saved in data_from_explorer.txt");
pStream->Release();
pPSI->Release();
}
Ïà¹ØÎĵµ£º
Ò»ÖÖ£º
<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
<title>¼æÈÝFireFoxµÄµ±Ç°Ê±¼äµÄJS½Å±¾</title>
</head>
<body>
<DIV id=time>µ±Ç°Ê±¼ä
<SCRIPT>document.getElementById('time').innerHTML=new Date().toLo ......
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; char ......
set ANSI_NULLS ON
set QUOTED_IDENTIFIER ON
Go
----½ØÈ¡×Ö·û´®£¬²¢³öÈ¥html
create FUNCTION [dbo].[CutString] (@str varchar(1000),@length int)
RETURNS varchar(1000) AS
BEGIN
declare @mainstr varchar(1000)
declare @substr varchar(1000)
if(@str is not null or @st ......
³£ÓÃÕýÔò±í´ïʽ´óÈ«£¡£¨ÀýÈ磺ƥÅäÖÐÎÄ¡¢Æ¥Åähtml£©
Æ¥ÅäÖÐÎÄ×Ö·ûµÄÕýÔò±í´ïʽ£º [u4e00-u9fa5]
¡¡¡¡ÆÀ×¢£ºÆ¥ÅäÖÐÎÄ»¹ÕæÊǸöÍ·ÌÛµÄÊ£¬ÓÐÁËÕâ¸ö±í´ïʽ¾ÍºÃ°ìÁË
¡¡¡¡Æ¥ÅäË«×Ö½Ú×Ö·û(°üÀ¨ºº×ÖÔÚÄÚ)£º[^x00-xff]
¡¡¡¡ÆÀ×¢£º¿ÉÒÔÓÃÀ´¼ÆËã×Ö·û´®µÄ³¤¶È£¨Ò»¸öË«×Ö½Ú×Ö·û³¤¶È¼Æ2£¬ASCII×Ö·û¼Æ1£©
¡¡¡¡Æ ......
Èç¹ûAJAX¼ÓÔصÄÊý¾ÝÊÇÒ»¸öHTMLƬ¶Î£¬¶øÇÒÕâ¸öHTMLƬ¶Î»¹°üº¬½Å±¾<script>¿é£¬ÄÇôÔÚÄã°ÑÕâÊý¾ÝxmlHttp.responseTextÓÃinnerHTML·½·¨²åÈëµ½µ±Ç°ÎĵµÒ»¸öÔªËØÖУ¬Äã»á·¢ÏÖAJAX¼ÓÔØ»ØÀ´µÄ½Å±¾¸ù±¾Ã»ÓÐÖ´ÐС£ÕâÊÇAJAX¿ª·¢Öкܳ£¼ûµÄÎÊÌ⣬Èç¹ûÄã²»ÊÇÒ»Ö±ÔÚÓÃJavaScript¿ò¼Ü×ö¿ª·¢£¬ÏàÐÅÄãÔç¾Í·¢ÏÖÕâ¸öÎÊÌâÁË¡£±¾ÎÄ·ÖÎöÁËÁ ......