日期:2014-05-16  浏览次数:20406 次

xml 数据岛 数据邦定 请教高手..
xml   数据岛

能否   把数据邦定到一个元素的   属性   .

邦定数据到图片   能否   和 <img   src= " "   /> 里的一个字符串拼接..

就像   <img   src= "images/xxx.gif "   datafld= "pic_name "   />   这样邦定

后   的结果是   <img   src= "images/pic_1.gif "   />   这样能实现吗,   还盼高手出现


------解决方案--------------------
<body>
<xml id= "oXML ">
<mydata>
<website>
<logo> http://www.baidu.com/img/logo-yy.gif </logo>
<url> http://www.baidu.com </url>
<description> 百度 </description>
</website>
<website>
<logo> http://www.csdn.net/ui/styles/public_header_footer/logo_csdn.gif </logo>
<url> http://www.csdn.net </url>
<description> CSDN </description>
</website>
<website>
<logo> http://images.zhaopin.com/new2/images/jobseeker/zhaopin-newlogo.gif </logo>
<url> http://www.zhaopin.com </url>
<description> 智联招聘 </description>
</website>
</mydata>
</xml>

<table id= "oTab " datasrc= "#oXML " dataPageSize= "1 ">
<tr> <td> <img datafld= "logo "> </td> </tr>
<tr> <td> <a datafld= "url " target= "blank "> <span datafld= "url "/> </a> </tr>
<tr> <td> <a datafld= "url " target= "blank "> <span datafld= "description "> </span> </a> </td> </tr>
</table>
<div>
<input type= "button " name= "首页 " value= "首页 " onClick= "oTab.firstPage(); ">
<input type= "button " name= "上页 " value= "上页 " onClick= "oTab.previousPage(); ">
<input type= "button " name= "下页 " value= "下页 " onClick= "oTab.nextPage(); ">
<input type= "button " name= "末页 " value= "末页 " onClick= "oTab.lastPage(); ">
</div>
</body>