第四步:添加客户端绑定
<INPUT onclick="WebTest1.MyClass.GetDataSet(callback)" type="button" value="GetDataSet"><div id="oDataPanel"></div><TABLE datasrc="#xmlData" WIDTH="500" BORDER="1" CELLSPACING="1" CELLPADDING="1"> <thead> <tr> <th width="70%">姓名</th> <th width="30%">年龄</th> </tr> </thead> <TR> <TD><span datafld="Text"></span></TD> <TD><span datafld="Number"></span></TD> </TR></TABLE><div id="oDataPanel">是准备用来存放Xml数据源的容器
第五步:编定加载数据的JavaScript代码
function callback(res){if(!res.error){document.all.oDataPanel.innerHTML = '<xml id="xmlData">'+ res.value +'</xml>';}else{alert(res.error.Message);}}
(编辑:aniston)
·2024年12月目录 ·2024年11月目录 ·2024年10月目录 ·2024年9月目录 ·2024年8月目录 ·2024年7月目录 ·2024年6月目录 ·2024年5月目录 ·2024年4月目录 ·2024年3月目录 ·2024年2月目录 ·2024年1月目录 ·2023年12月目录 ·2023年11月目录