以文本方式查看主题

-  中文XML论坛 - 专业的XML技术讨论区  (http://bbs.xml.org.cn/index.asp)
--  『 SVG/GML/VRML/X3D/XAML 』  (http://bbs.xml.org.cn/list.asp?boardid=21)
----  事件的基本程序[求助]  (http://bbs.xml.org.cn/dispbbs.asp?boardid=21&rootid=&id=60955)


--  作者:定风波
--  发布时间:4/5/2008 11:55:00 PM

--  事件的基本程序[求助]
[color=#FF0000]比如,鼠标点击一个椭圆,则显示“welcome”\r\n\r\n事件的基本写法???\r\n\r\n本人新学,很多不懂的

[/color]


--  作者:定风波
--  发布时间:4/5/2008 11:58:00 PM

--  
<?xml version="1.0"?>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:svg="http://www.w3.org/2000/svg" xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<head>
<script>
<![CDATA[
function init()
{
ellipse = document.getElementById('ellip');
ellipse.addEventListener("click", mouseclick_listener, false);
}     
function mouseclick_listener(evt)
{
alert("welcome to swjtu");
}

   ]]>
 </script>
</head>
<body onload="init();">
<h1>        Click on the ellipse!</h1>
        <ellipse id="ellip"cx="562" cy="374" rx="10" ry="5"
                   style="fill: red;"/>
</body>      

</html>


这错在哪里???


W 3 C h i n a ( since 2003 ) 旗 下 站 点
苏ICP备05006046号《全国人大常委会关于维护互联网安全的决定》《计算机信息网络国际联网安全保护管理办法》
31.250ms