JavaScript ÔÚ±¾´°¿Ú´ò¿ªÍøÒ³
<html>
<head>
<mce:script type="text/javascript"><!--
function aaa()
{
alert("oh no");
window.location="http://community.csdn.net/";
}
// --></mce:script>
</head>
<body onload = aaa();>
<body>
</html>
Ïà¹ØÎĵµ£º
×î½üÒªÓõ½Ïà¹Ø¼¼Êõ£¬ÏÈÌùÔÚÕ⣬ÓпÕÔÙ·Ò³¡£
±¾ÎÄת×Ô£º
http://www.codeguru.com/Cpp/I-N/ieprogram/article.php/c4399
http://www.codeguru.com/cpp/i-n/ieprogram/article.php/c4399/JavaScript-Calls-from-C.htm
http://www.codeproject.com/KB/COM/jscalls.aspx
Introduction
Sometimes, when we are usi ......
1.call·½·¨
¹Ù·½£¨JavaScriptÊֲᣩ£º
µ÷ÓÃÒ»¸ö¶ÔÏóµÄÒ»¸ö·½·¨£¬ÒÔÁíÒ»¸ö¶ÔÏóÌæ»»µ±Ç°¶ÔÏó¡£
call([thisObj[,arg1[,
arg2[, [,.argN]]]]])
²ÎÊý
thisObj ¿ÉÑ¡Ïî¡£½«±»ÓÃ×÷µ±Ç°¶ÔÏóµÄ¶ÔÏó¡£
arg1, arg2, , argN
¿ÉÑ¡Ïî¡£½«±»´«µÝ·½·¨²ÎÊýÐòÁС£
˵Ã÷
call ·½·¨¿ÉÒÔÓÃÀ´´ú ......
JavaScript ʱ¼ä¼Ó¼õ:
<HTML>
<BODY>
<script type="text/javascript">
var time = new Date("04/30/2010");
document.write(time);
......
javascript ¿ØÖÆ htmlÔªËØ ÏÔʾ/Òþ²Ø
1¡£±àдjsº¯Êý
<script type="text/javascript">
function display(y){$(y).style.display=($(y).style.display=="none")?"":"none";}
function $(s){return document.getElementById(s);}
</script>
2. ÒªÏÔÊ ......
Javascript ÔÚASP.net ĸ°åҳϷÃÎÊ ¿Ø¼þID£º
¶ÔÓÚ html control : Ö±½Ó·ÃÎÊID
document.getElementById("hfRespondID");
¶ÔÓÚ Web control :
document.getElementById("<%= this.hfRespondID.ClientID %>") [×¢Òâ´óСд
]
&nb ......