Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

javascriptѧϰÐĵÃ(2)

ÄÚ²¿Êý×é
ÔÚJavaÖÐΪÁË·½±ãÄÚ²¿¶ÔÏóµÄ²Ù×÷,¿ÉÒÔʹÓô°Ìå(Forms)¡¢¿ò¼Ü(Frames)¡¢ÔªËØ(element)¡¢Á´½Ó(links)ºÍê(Anchors)Êý×éʵÏÖ¶ÔÏóµÄ·ÃÎÊ¡£
¡¡anchors[]:ʹÓá¶A name=“anchorName“¡·±êʶÀ´½¨Á¢ÃªµÄÁ´½Ó¡£
¡¡links[]: ʹÓÃ<A href=”URL”>À´¶¨ÒåÒ»¸öÔ½Îı¾Á´½ÓÏî¡£
¡¡Forms[]: ÔÚ³ÌÐòÖÐʹÓöരÌåʱ,½¨Á¢¸ÃÊý×é¡£
¡¡Elements[]:ÔÚÒ»¸ö´°¿ÚÖÐʹÓôӸöÔªËØʱ,½¨Á¢¸ÃÊý×é¡£
¡¡Frames[]:½¨Á¢¿ò¼Üʱ,ʹÓøÃÊý×é
¡¡anchors[]ÓÃÓÚ´°ÌåµÄ·ÃÎÊ(ËüÊÇͨ¹ý¡¶form name=“form1”¡·ËùÖ¸¶¨µÄ),link[]ÓÃÓÚ±»Á´½Óµ½µÄêµãµÄ·ÃÎÊ(ËüÊÇͨ¹ý¡¶a href=URL¡·ËùÖ¸¶¨µÄ)¡£Forms[]·´Ó³´°ÌåµÄÊôÐÔ,¶øanchors[]·´Ó³WebÒ³ÃæÖеÄÁ´½ÓÊôÐÔ¡£
ÓйØêÊý×éµÄÎĵµ£º
<HTML>
<HEAD>
<BODY>
<A NAME=”MyAnchorsName1”> ¶¨ÒåµÚÒ»¸öêÃû
HTML Code
<A NAME=”MyAnchorsName2”> ¶¨ÒåµÚ¶þ¸öêÃû
HTML Code
<A HREF=”#MyAnchorsName1”>½¨Á¢ÃªµÄÁ´½Ó
<A HREF=”#MyAnchorsName2?gt; ½¨Á¢ÃªµÄÁ´½Ó  Ô¤¶¨µãµÄλÖÃ
….
¸ÃÎĵµ¶Î½¨Á¢ÁËÁ½ÃæȫêµÄÁ´½Ó,¿Éͨ¹ýAnchors[]·ÃÎÊÕâЩê¡£document.Anchors[0]·´Ó³µÚÒ»¸öê,¶ødocument.Anchors[1]·´Ó³µÚ¶þ¸öêµÄÓйØÐÅÏ¢¡£
£³¡¢Îĵµ¶ÔÏóµÄ»ù±¾ÔªËØ
£¨£±£©´°ÌåÊôÐÔ£º
¡¡¡¡´°ÌåÊôÐÔÊÇÓëHTMLÎĵµÖÐ<Form>...</Form>Ïà¶ÔÓ¦µÄÒ»×é¶ÔÏóÔÚHTMLÎĵµËù´´½¨µÄ´°ÌåÊý£¬ÓÉlengthÖ¸¶¨¡£Í¨¹ýdocument.forms.length·´Ó³¸ÃÎĵµÖÐËù´´½¨µÄ´°ÌåÊýÄ¿¡£
£¨£²£©ÃªÊôÐÔ£ºanchors
¡¡¡¡¸ÃÊôÐÔÖУ¬°üº¬ÁËHTMLÎĵµµÄËùÓÐ<A> </A>±ê¼ÇΪName=...µÄÓï¾ä±êʶ¡£ËùÓГꔵÄÊýÄ¿±£´æÔÚdocument.anchors.lengthÖС£
£¨£³£©Á´½ÓÊôÐÔ£ºlinks
¡¡¡¡Á´½ÓÊôÐÔÊÇÖ¸ÔÚÎĵµÖÐ<A>...</A>µÄÓÉHref=...Ö¸¶¨µÄÊýÄ¿£¬ÆäÁ´½ÓÊýÄ¿±£´æÔÚdocument.links.lengthÖС£
Èý¡¢·¶Àý
Àý1:ÏÂÃæÎÒÃÇͨ¹ýÒ»¸öÀý×ÓÀ´ËµÃ÷Îĵµ¶ÔÏóµÄ×ÛºÏÓ¦Óá£Êä³ö½á¹û¼ûͼ6-2Ëùʾ¡£
Test6_2.htm
<html>
<head>
</HEAD>
<BOdy>
<Form Name="mytable">
ÇëÊäÈëÊý¾Ý£º
<Input Type="text" Name="text1" Value="">
</Form>
<A name="Link1" href="test31.htm">Á´½Óµ½µÚÒ»¸öÎı¾</a><br>
<A name="Link2" href="test32.htm">Á´½Óµ½µÚ¶þ¸öÎı¾


Ïà¹ØÎĵµ£º

jLayout — JavaScript Layout Algorithms


The jLayout JavaScript library provides layout algorithms for laying out components. A component is an abstraction; it can be implemented in many ways, for example as items in a HTML5 Canvas drawing or as HTML elements. The jLayout library allows you to focus on drawing the individual components i ......

JavaScript ¶ÁÈ¡ JSON


JSON:
[{"subjecttypeId":"1","subjectName":"67","scope":"1",},{"subjecttypeId":"1","subjectName":"345","scope":"1"}]
JavaScript:
       var result = window.eval('(' + JSON+ ')');

for(var p in result){

result[p].subjectName;

alert(result[p] ......

JavascriptÎļþ¼°Îļþ¼Ð²Ù×÷

JavascriptÎļþ¼°Îļþ¼Ð²Ù×÷
 
Ò»¡¢¹¦ÄÜʵÏÖºËÐÄ£ºFileSystemObject ¶ÔÏó
    ÒªÔÚjavascriptÖÐʵÏÖÎļþ²Ù×÷¹¦ÄÜ£¬Ö÷Òª¾ÍÊÇÒÀ¿¿FileSystemobject¶ÔÏó¡£
¶þ¡¢FileSystemObject±à³Ì
ʹÓÃFileSystemObject ¶ÔÏó½øÐбà³ÌºÜ¼òµ¥£¬Ò»°ãÒª¾­¹ýÈçϵIJ½Ö裺 ´´½¨FileSystemObject¶ÔÏó¡¢Ó¦ÓÃÏà¹Ø·½·¨¡¢· ......

Javascript ʹÓÃIDE¹¤¾ß½øÐе÷ÊÔ

1. Javascript Debug Toolkit½éÉÜ
JSDT(Javascript Debug Toolkit)ÊÇÒ»¸öÓÃÓÚjavascriptµ÷ÊÔµÄeclipse
²å¼þ£¬ÓÃÓÚµ÷ÊÔjavascript¡£JSDT¿ÉÒÔ¿çä¯ÀÀÆ÷µ÷ÊÔ£¬Ö§³ÖÔÚIE,Firefox,Safari,ChromeµÈÖ÷Á÷ä¯ÀÀÆ÷Öе÷ÊÔ
javascript¡£JSDTÖ§³ÖÉèÖöϵ㣬µ¥²½µ÷ÊԵȵ÷ÊÔ¹¤¾ßµÄ»ù±¾ÌØÐÔ¡£
2. ÈçºÎ°²×°
JSDTÊÇ»ùÓÚeclipse3.2+,jdk1.5+ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ