ÓÃjavascript¶¯Ì¬ÉèÖÃcssÑùʽµÄÖµ
css¿ØÖÆÎ»Öãº
´¿Êý×Ö
el.style.posLeft = 0;
el.style.posTop = 0;
Êý×Ö+µ¥Î»
el.style.left = "0px";
el.style.top = "0px";
css¿ØÖÆÔªËصÄÑùʽ£º
document.getElementById("para").style.fontWeight ="bold";
»ò£¨ÆäËûÒ²ÊÇÕâÑù£©£º
document.getElementById("para").className ="strong";
Ïà¹ØÎĵµ£º
Ò»Ö±ÒÔÀ´¶Ôif(obj)µÄÓ÷¨ÓеãÒɻ󣬲»ÖªµÀÈç¹ûobjÊÇÒ»¸ö¶ÔÏóµÄʱºò(¶ø²»ÊǼòµ¥µÄtrue/false)£¬¸ÃÔõôִÐС£ÔÚʲôÇé¿öϸÃΪtrue£¬Ê²Ã´Çé¿öÏÂÓÖ¸ÃΪfalse.
ͨ¹ýÏÂÃæµÄС²âÊÔ£¬Á˽⵽£¬µ±obj="",obj=undefined,obj=null,obj=NaN µÄʱºò·µ»Øfalse,obj²»Îª¿ÕµÄʱºòÔò·µ»Øtrue¡£
var obj ;//undefined
if(ob ......
The ExternalInterface API
֮ǰÎÒÃÇʹÓÃflashµ÷ÓÃjavascriptº¯Êý£¬Ò»°ãʹÓÃÕâÑùµÄ·½·¨£º
´úÂë:
getURL(¡°javascript:alert(¡®hello zhang-chao.com¡¯);¡±); //×¢Òâ×Ö·û´® Ë«ÒýºÅ ÀïÃæ¼Óµ¥ÒýºÅ
µ«ÊÇʹÓÃÕâÖÖ·½·¨´Óflashµ÷ÓÃjavascriptº¯ÊýÈÔ´æÔÚÐí¶àÀ§ÄÑ ......
1. CSSµÄÒªµãÊÇÔÚÄãµÄÒ³ÃæÖÐʹÓüò½àµÄHTML´úÂë,È»ºó±àдCSS"¿ØÖƹæÔò"À´Ñùʽ»¯Ò³ÃæÖеĶÔÏó.Ò³Ãæ±£³ÖÇåÎúÓÐÌõ²»ÎÉ¿´ÉÏÈ¥·Ç³£°ô.ÕâÑùÄãµÄHtmlÒ³Ãæ¿ÉÒÔÔÚÒÆ¶¯É豸ºÍ±ê×¼ä¯ÀÀÆ÷ÖÐÔËÐÐ.Õâ¾ÍÊÇCSSµÄÒªµã.
²»¹ýCSSµÄÒÕÊõÔÚÓÚÄܹ»ÀûÓÃCSS¿ØÖƹæÔò¿ìËÙÓÐЧµØ²Ù×ÝÒ³Ãæ¶ÔÏó.°ÑCSS¹æÔòÓëHTML±ê¼ÇÆ¥ÅäÆðÀ´µÄ²Ù×ö¾ÍºÃÏñÊÇÒ»ÖÖ¶ ......
<!-- ѧϰ×ÔjavaeyeµÄÎÄÕ ÇëתÌùÕß×¢×Ô³ö´¦ learner:nilinfa -->
<HTML>
<script>
/*¶¨ÒåÒ»¸öеĶÔÏó*/
var emptyObject1 = {};
/*¶¨ÒåÒ»¸öеĶÔÏó*/
var emptyObject2 = new Object();
/*¶¨ÒåÒ»¸öеĶÔÏ󣬼üÖµ¶ÔÓ¦*/
v ......
1¡¢ÁбíºáÅÅ
½«liµÄÑùʽÉèÖÃΪ
li {display:block;float:left;}
2¡¢È¥³ýͼƬ´¹Ö±·½ÏòµÄ¿Õ°×
×îºÃµÄ×ö·¨ÊÇΪimg ¼ÓÉÏ vertical-alignÊôÐÔ£¬ÕâÑù¾Í¿´²»µ½¿Õ°×ÁË¡£
......