javascriptÈçºÎ¶¨ÒåÀà
javascriptÈçºÎ¶¨ÒåÀàÄØ£¿
ÃæÊÔµÄʱºòÓÐѧÉú±»Îʵ½Õâ¸öÎÊÌâ¡£
ʵ¼ÊÉÏjavascriptµÄ·½·¨¾ÍÊÇÒ»¸ö¶ÔÏó¡£
ÀûÓÃÕâÒ»µã£¬ÎÒÃÇ¿ÉÒÔʹÓÃjavascript¶¨ÒåÀà¡£
ÈçÏÂÀý×ÓËùʾ¡£
<mce:script language="javascript"><!--
//javascriptµÄÃæÏò¶ÔÏóµÄÀý×Ó
function sayHi(){
alert("Hello ,"+this.name);
}
function getAge(){
alert("my age:"+this.age);
}
function Student(name,age){
var tempStu=new Object;
//ÊôÐÔ
tempStu.name=name
tempStu.age=age;
//·½·¨
tempStu.sayHi=sayHi;
tempStu.getAge=getAge;
return tempStu;
}
var s =Student("jack",20);
s.sayHi();
s.getAge();
// --></mce:script>
¶¨ÒåÀàÓкü¸ÖÖ·½Ê½¡£ÒÔÉÏÖ»ÊÇÆäÖÐÒ»ÖÖ¡£´ó¼Ò¿ÉÒÔÔÚÈËÃñÓʵ磬¡¶javascript¸ß¼¶³ÌÐòÉè¼Æ¡·
Ò»ÊéÈ¥ÕÒµ½¸ü¶à·½·¨¡£
Ïà¹ØÎĵµ£º
µÚÎåÕ Êý×é JavaScriptµÄÊý×éÒ²ÊÇÒ»¸ö±È½ÏÓÐÒâ˼µÄÖ÷Ì⣬ËäÈ»ÃûΪÊý×é(Array)£¬µ«ÊǸù¾ÝÊý×é¶ÔÏóÉϵķ½·¨À´¿´£¬¸üÏñÊǽ«ºÜ¶à¶«Î÷»ìÔÚÔÚÒ»ÆðµÄ½á¹û¡£¶ø´«Í³µÄ³ÌÐòÉè¼ÆÓïÑÔÈçC/JavaÖУ¬Êý×éÄÚµÄÔªËØÐèÒª¾ßÓÐÏàͬµÄÊý¾ÝÀàÐÍ£¬¶ø×÷ΪÈõÀàÐ͵ÄJavaScript£¬ÔòûÓÐÕâ¸öÏÞÖÆ£¬ÊÂʵÉÏ£¬JavaScriptµÄͬһ¸öÊý×éÖУ¬¿ÉÒÔÓи÷ÖÖÍêÈ«²»Í ......
¼òÂÔÓï¾ä
JavaScript ¿ÉÒÔʹÓüòÂÔÓï¾ä¿ìËÙ´´½¨¶ÔÏóºÍÊý×飬±ÈÈçÏÂÃæµÄ´úÂ룺
¿ÉÒÔʹÓüòÂÔÓï¾äÈçÏ£º
¶ÔÏó car ¾Í´Ë´´½¨£¬²»¹ýÐèÒªÌØ±ð×¢Ò⣬½áÊø»¨À¨ºÅǰһ¶¨²»Òª¼Ó ";" ·ñÔòÔÚ IE »áÓöµ½ºÜ´óÂé·³¡£
´´½¨Êý×éµÄ´«Í³·½·¨ÊÇ£º
ʹÓüòÂÔÓï¾äÔò£º
ÁíÒ»¸ö¿ÉÒÔʹÓüòÂÔÓï¾äµÄµØ·½ÊÇÌõ¼þÅжÏÓï¾ä£º
¿ÉÒÔ¼òÂÔΪ£ ......
JavaScript»ñÈ¡DOM½ÚµãÔªËØ
ÔÚWebÓ¦ÓóÌÐòÌØ±ðÊÇWeb2.0³ÌÐò¿ª·¢ÖУ¬¾³£Òª»ñÈ¡Ò³ÃæÖÐij¸öÔªËØ£¬È»ºó¸üиÃÔªËØµÄÑùʽ¡¢ÄÚÈݵȡ£ÈçºÎ»ñȡҪ¸üеÄÔªËØ£¬ÊÇÊ×ÏÈÒª½â¾öµÄÎÊÌâ¡£ÁîÈËÐÀοµÄÊÇ£¬Ê¹ÓÃJavaScript»ñÈ¡½ÚµãµÄ·½·¨ÓкܶàÖÖ£¬ÕâÀï¼òµ¥×öÒ»ÏÂ×ܽ᣺
ͨ¹ý¶¥²ãdocument½Úµã»ñÈ¡£º
1. document.getElement
......
ÐèÒªÁ˽âµÄHTML֪ʶ
±êÇ© table,tr,th,td
ÓÃÑ»·½øÐÐÖØ¸´²Ù×÷
for(;;){}
javascript×Ö·û´®
ÔÚjavascriptÖУ¬µÚÒ»¸ö×Ö·ûÔÚλÖÃ0ÉÏ¡£cat£¬cÔÚλÖÃ0ÉÏ£¬aÔÚλÖÃ1É ......
ÒÔÏÂÊÂÀýΪ½áºÏ±¾È˵çÄÔ¶øÉè¼ÆµÄ²ÎÊý,ÄúÒ²¿É¸ÄΪ×Ô¼ºµÄ³ß´ç
<SCRIPT LANGUAGE="JavaScript">
var chicun;
chicun=screen.width;
if(chicun==1280||chicun==1440||chicun==1600)
{
<!--
function initEcAd() {
document.all.AdLayer1.style.posTop = -100;
document.all.AdLayer1.style.visibility = 'vis ......