闂:
鐢婚〉闈?鎴?鎶ヨ〃 鐨?鍥捐薄闂
瑙e喅錛?/b>鐢?閫氳繃xml鐢誨浘聽 鐢葷瑪wz_jsgraphics.js聽
聽聽聽 聽聽聽 聽聽聽 聽聽聽 聽聽聽 聽 xml鏁版嵁鍙栧緱 prototype.js
聽聽聽 聽聽 聽聽 聽聽 聽聽 聽聽 聽聽 鐢誨姩浣?Xmlgraphics.js 錛堣嚜宸卞寘瑁咃級
聽聽聽 涓嬭澆錛?font color="#006400">http://www.aygfsteel.com/Files/Good-Game/Mywz_jsgraphics.rar聽 璇鋒斁鍦?鏈嶅姟鍣ㄤ笂(tomcat) 騫舵敼 聽聽 聽聽聽 聽聽聽 聽聽聽 聽聽聽 聽聽聽 聽 testLine.html欏甸潰涓婄殑 load( ul ) =>>聽 ul 錛?xml 鐨勫彇寰楀湴鏂?錛?
聽聽聽聽聽聽聽聽聽聽聽 璇鋒敞鎰?錛?IE 5 鏀寔涓嶅ソ 璇風敤 鐏嫄 鎴?IE6
鍥劇墖 錛?/font>

EG:
聽聽 榪欏睍鐜頒簡 鐢葷嚎 鐢誨浘聽 鍒?鐢誨瓧鐨勭畝鍗曡繃紼?br />
<grabhics>
聽聽聽聽<line聽x1='0'聽y1='0'聽x2='40'聽y2='0'聽color='green'聽聽stroke='4'聽/>
聽聽聽聽<line聽id='l1'聽x1='0'聽y1='0'聽x2='0'聽y2='200'聽color='darkblue'聽聽stroke='8'聽/>
聽聽聽聽
聽聽聽聽<rect聽x='20'聽y='20'聽w='40'聽h='70'聽color='hotpink'聽聽stroke='4'聽/>
聽聽聽聽<rect聽id='r1'聽x='100'聽y='60'聽w='20'聽h='200'聽color='greenyellow'聽聽stroke='8'聽/>
聽聽聽聽
聽聽聽聽<fillRect聽x='50'聽y='60'聽w='40'聽h='70'聽color='darkolivegreen'聽聽stroke='2'聽/>
聽聽聽聽<fillRect聽id='fr1'聽x='150'聽y='250'聽w='20'聽h='45'聽color='darkturquoise'聽聽stroke='1'聽/>
聽聽聽聽
聽聽聽聽<ellipse聽x='0'聽y='100'聽w='50'聽h='100'聽color='darkolivegreen'聽聽stroke='5'聽/>
聽聽聽聽<ellipse聽id='e1'聽x='250'聽y='0'聽w='34'聽h='46'聽color='darkturquoise'聽聽stroke='7'聽/>
聽聽聽聽
聽聽聽聽<fillEllipse聽x='0'聽y='150'聽w='150'聽h='70'聽color='darkolivegreen'聽聽stroke='5'聽/>
聽聽聽聽<fillEllipse聽id='fe1'聽x='250'聽y='20'聽w='84'聽h='48'聽color='gray'聽聽stroke='7'聽/>
聽聽聽聽
聽聽聽聽<fillArc聽x='32'聽y='124'聽w='130'聽h='170'聽start='0'聽end='190'聽color='red'聽聽/>
聽聽聽聽<fillArc聽id='fa1'聽x='200'聽y='300'聽w='40'聽h='20'聽start='0'聽end='300'聽color='red'聽聽/>
聽聽聽聽<polygon聽xs='32,80,23,7,64'聽ys='124,2,42,24,6'聽color='darkolivegreen'聽聽/>
聽聽聽聽<polygon聽id='pp1'聽xs='32,4,2'聽ys='124,3,51'聽color='darkolivegreen'聽聽/>
聽聽聽聽<fillPolygon聽xs='10,85,93,60'聽ys='50,10,105,87'聽color='00aaaa'聽聽/>
聽聽聽聽<fillPolygon聽id='adfh'聽聽xs='80,126,-30,-60'聽ys='0,130,40,100'聽color='00aaaa'聽聽/>
聽聽聽聽
聽聽聽聽<image聽x='200'聽y='300'聽w='50'聽h='50'聽url='../image/test.bmp'聽/>
聽聽聽聽<image聽id='ima'聽x='300'聽y='300'聽w='50'聽h='50'聽url='../image/test.bmp'聽/>
聽聽聽聽<string聽聽font='arial'聽聽size='15'聽style='Font.ITALIC_BOLD'聽str='鍒樺嚡姣?聽x='300'聽y='400'聽color='red'聽/>
聽聽聽聽<string聽id='strr'聽聽font='arial'聽聽size='20'聽style='Font.ITALIC_BOLD'聽str='涓囧瞾'聽x='310'聽y='420'聽聽/>
</grabhics>
綆鍗曢〉闈?錛?緇欏嚭 div 鐨?id 錛堜綅緗?鍜?xml 鐨勫嚭澶?灝卞彲浠ヤ簡錛塴oad() 鏂規硶
<!DOCTYPE聽HTML聽PUBLIC聽"-//W3C//DTD聽HTML聽4.01//ZH-CN"聽"http://www.w3.org/TR/html4/strict.dtd">
<html>
聽聽聽聽<head>
聽聽聽聽聽聽聽聽<meta聽http-equiv="Content-Type"聽content="text/html;聽charset=UTF-8"聽/>
聽聽聽聽聽聽聽聽<script聽language="JavaScript"聽src='../lib/prototype/wz_jsgraphics.js'聽></script>
聽聽聽聽聽聽聽聽<script聽language="JavaScript"聽src="../lib/prototype/prototype.js"></script>
聽聽聽聽聽聽聽聽<script聽language="JavaScript"聽src="../js/test.js"聽></script>
聽聽聽聽聽聽聽聽<script聽language="JavaScript"聽src="../js/Xmlgraphics.js"聽></script>
聽聽聽聽聽聽聽聽
聽聽聽聽</head>
聽聽聽聽
聽<body聽onload='load(聽"http://127.0.0.1:8000/Mywz_jsgraphics/xml/graphics.xml"聽)'>聽聽聽聽聽
聽聽聽<div聽id="myCanvas"聽style="position:relative;height:250px;width:100%;">聽<input聽type='button'聽onclick='tt()'聽/>聽</div>聽
聽</body>
</html>
<script>
聽聽聽聽function聽tt(){
聽聽聽聽聽聽聽聽var聽uu聽=聽'strr'
聽聽聽聽聽聽聽聽聽var聽g2聽=聽getGdom(uu)聽;
聽聽聽聽聽聽聽聽getValue(uu).clear();
聽聽
聽聽聽聽}
聽聽聽聽
</script>

]]>