网上下载的一个rico例子,不知道怎么不运行。请高手指点。<html>
<head>
<title>AjaxTest</title><script src="../prototype.js"></script>
<script src="../rico.js"></script><script>
function bodyOnLoad()
{
ajaxEngine.registerRequest('getwords','1.xml');
ajaxEngine.registerAjaxElement('word');
} function getword()
{
alert("getword");
ajaxEngine.sendRequest('getwords');
}
</script></head>
<body onload="javascript:bodyOnLoad()"> <div id="word">This is a test</div>
<div ><a href="javascript:getword();">Click Here</a></div></body>
</html>-------------------------------------
1.xml<ajax-response>
<response type="element" id="word">
<b>hello world 0.208002263747</b>
</response>
</ajax-response>
<head>
<title>AjaxTest</title><script src="../prototype.js"></script>
<script src="../rico.js"></script><script>
function bodyOnLoad()
{
ajaxEngine.registerRequest('getwords','1.xml');
ajaxEngine.registerAjaxElement('word');
} function getword()
{
alert("getword");
ajaxEngine.sendRequest('getwords');
}
</script></head>
<body onload="javascript:bodyOnLoad()"> <div id="word">This is a test</div>
<div ><a href="javascript:getword();">Click Here</a></div></body>
</html>-------------------------------------
1.xml<ajax-response>
<response type="element" id="word">
<b>hello world 0.208002263747</b>
</response>
</ajax-response>
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货