¹ØÓÚjavascriptµÄÖØÔØ - Web ¿ª·¢ / JavaScript
ÇëÎÊÕâÑùµÄ»°×ÓÀ಻ÊǸù¾Ý²ÎÊýÁбíµÄ²»Í¬ÖØÔØÁËa·½·¨Â𣿣¿
µ«ÊÇΪʲôÊä³öÊÇChild Method count undefined ÄØ£¿£¿
²»ÊÇÓ¦¸Ã¸ù¾Ý²ÎÊýÁбíµÄ²»Í¬µ÷ÓÃÁË´Ó¸¸Àà¼Ì³ÐµÄa·½·¨£¬Êä³öParent Method countÂ𣿣¿
ÇëÖ¸½Ì£¡~~
function Parent() {
this.a=function(){
alert("Parent Method count");
}}
Children.prototype = new Parent();
function Children() {
this.a = function(cc) {
alert("Child Method count" + cc);
}
}
var c = new Children();
c.a();
JavaScriptÏÂûÓÐÖØÔØ£¬ÕâÑùдÊǰÑParentµÄº¯Êý¸²¸ÇÁË¡£
ÒªÖØÔØÐèÒª×ÔÒÑ×öЩ´¦Àí```
ÒòΪÄãдµÄ×ÓÀàa()·½·¨¸²¸Ç¸¸ÀàµÄa()·½·¨£¬
ֻҪעÊ͵ô×ÓÀàa()·½·¨¾Í¿ÉÒÔÁË¡£
this.a=function(){
alert("Parent Method count");
}}
Children.prototype = new Parent();
function Children() {
/*
this.a = function(cc) {
alert("Child Method count" + cc);
}
*/
}
var c = new Children();
c.a();
function Parent() {
this.a=function(){
alert("Parent Method");
}}
Children.prototype = new Parent();
function Children() {
this.b = funct
Ïà¹ØÎÊ´ð£º
ÕâÊÇÎÒµÄÎı¾¿ò
<input type="text" size="60" name="password_answer" id="pwdanswer" value="$!password_answer" >
Ìá½»°´Å¥
<input clas ......
ÓÃjavascript½«Êý¾Ýµ¼³öµ½Îı¾Îļþ(txt)ÖÐ..
Ê×ÏȼÙÉèÒѾÓÐÁËÐèҪдÈëµÄÎı¾ÄÚÈÝ var txtContent ="ÐèҪдÈëµÄÄÚÈÝ";
ÏÖÔÚÐèÒªÓÃjavascript½«ÄÚÈÝдÈëtxtÎļþ(Õâ¸ötxtÎļþ²»´æÔÚ,ÐèÒª´´½¨)ÖÐ,È»ºóдºÃÖ ......
ÎÒÒ²À´Ò»¸öȤζjavascript:
´ò¿ªÒÔÏÂhtmlÎļþ,ÒÀ´Î°´ÏÂG,L,CÈý¸ö¼ü,¾Í»áÓÐÆæ¼£³öÏÖ!!
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" ......
Îʸö±È½Ï»ù´¡µÄÎÊÌ⣬ÔÚÒ»¸öhtmlÎļþÖÐÒýÈëÁËÒ»¸ö.jsµÄÎļþ£¬ÄÇô¶ÔÓÚÕâ¸ö .js µÄÎļþÀ´Ëµ£¬ËüËù¶ÔÓ¦µÄµ±Ç°Â·¾¶Ó¦¸ÃÊÇÄÄÒ»¸ö£¿ÊÇhtmlÎļþËùÔڵķ¾¶£¬»¹ÊÇ .js ÎļþµÄ·¾¶£¿£¨htmlÓëjs²»ÔÚͬһÎļþ¼ÐÖУ©
ÓÉÓÚjsÖÐÒ ......
<%
function getName(num)
......
end function
%>
<script>
var num=1;
var xx=<%=getName(num)%>
</script>
ÈçºÎ²ÅÄÜÔÚjava ......