Èç¹ûÔÚCHtmlDialogÖе÷ÓÃJavascriptº¯Êý
// µ÷ÓÃÒ³ÃæµÄˢз½·¨
IHTMLWindow2* pWindow;
IHTMLDocument2* pDocument;
HRESULT hr = GetDHtmlDocument(&pDocument);
hr = pDocument->get_parentWindow(&pWindow);
if( pWindow)
{
VARIANT ret;
ret.vt = VT_EMPTY;
CString sFunc = _T("RefreshFileForClient()");
CString sLang = _T("javascript");
hr = pWindow->execScript(sFunc.AllocSysString(), sLang.AllocSysString(), &ret);
}
Ïà¹ØÎĵµ£º
ÔÎĵØÖ·£ºhttp://www.cnblogs.com/daniel-shen/archive/2006/07/12/449280.html
javascript ÖÐthis µÄÓ÷¨:
1.<div onclick="// ¿ÉÒÔÔÚÀïÃæÊ¹ÓÃthis">division element</div> this Ö¸Ïòdiv
2. <div id="elmtDiv">division element</div>
&nbs ......
//ÏÔʾµ±Ç°Ê±¼ä----------------------------------------------------------
<SCRIPT language="javascript" type="text/javascript" >
function reloop(){
var time = new Date( ); //»ñµÃµ±Ç°Ê±¼ä
//»ñµÃÄê¡¢Ô¡¢ÈÕ£¬Date()º¯ÊýÖеÄÔ·ÝÊÇ´Ó0£11¼ÆËã
var year = time.getFullYear ......
phpÖеÄevalºÍJavaScriptÖеÄevalÇø±ð£º
Definition and Usage
¶¨ÒåºÍÓ÷¨
The eval() function evaluates a
string as PHP code.
eval()º¯ÊýµÄ×÷ÓÃÊÇ£º·µ»ØÓëPHP´úÂëÏà¶ÔÓ¦µÄ×Ö·û´®¡£
The string
must be valid PHP code and must end with semicolon.
Õâ¸ö×Ö·û´®±ØÐëÊÇÓÐЧµÄPHP´úÂ룬
²¢ÇÒ±ØÐëÒԷֺŽáÊø¡ ......