• 全部
  • 问答

xml数据岛问题

COKING 2004-09-12 02:32:29
<HTML>
<HEAD><TITLE>COOL</TITLE></HEAD>
<BODY>
名称:<INPUT TYPE=TEXT DATASRC=#DSO DATAFLD=NAME><BR>
地址:<INPUT TYPE=TEXT DATASRC=#DSO DATAFLD=ADDRESS><BR>
电邮:<INPUT TYPE=TEXT DATASRC=#DSO DATAFLD=E-MAIL ><BR>
电话:<INPUT TYPE=TEXT DATASRC=#DSO DATAFLD=TELEPHONE> <HR>

<INPUT TYPE=BUTTON VALUE="上一条" ONCLICK="DSO.recordset.MovePrevious()">
<INPUT TYPE=BUTTON VALUE="下一条" ONCLICK="DSO.recordset.MoveNext()">
<INPUT TYPE=BUTTON VALUE="添加" ONCLICK="DSO.recordset.addNew()">
<INPUT TYPE=BUTTON VALUE="删除" ONCLICK="DSO.recordset.Delete()"><HR>

<TABLE DATASRC="#DSO" BORDER=1>
<THEAD>
<TR>
<TD>名称</TD>
<TD>地址</TD>
<TD>电邮</TD>
<TD>电话</TD>
</TR>
</THEAD>
<TBODY>
<TR>
<TD>
<DIV DATAFLD="NAME"></DIV>
</TD>
<TD>
<DIV DATAFLD="ADDRESS"></DIV>
</TD>
<TD>
<DIV DATAFLD="E-MAIL"></DIV>
</TD>
<TD>
<DIV DATAFLD="TELEPHONE" ></DIV>
</TD>
</TR>
</TBODY>
</TABLE>

<XML ID="DSO" >
<MANLIST>
<MAN>
<NAME>张三</NAME>
<ADDRESS>海魂路1号</ADDRESS>
<E-MAIL>MASTER@SINA.COM</E-MAIL>
<TELEPHONE>(999)8888888</TELEPHONE>
</MAN>
<MAN>
<NAME>李四</NAME>
<ADDRESS>海魂路2号</ADDRESS>
<E-MAIL>MASTER@SOHU.COM</E-MAIL>
<TELEPHONE>(999)7777777</TELEPHONE>
</MAN>
<MAN>
<NAME>王五</NAME>
<ADDRESS>海魂路3号</ADDRESS>
<E-MAIL>MASTER@163.COM</E-MAIL>
<TELEPHONE>(999)6666666</TELEPHONE>
</MAN>
</MANLIST>
</XML>
</BODY>
</HTML>
--------------------------------------------------
怎么实现点击表格数据来移动记录,
就是让Text里的东西同步!!!!
...全文
133 点赞 收藏 2
写回复
2 条回复
切换为时间正序
当前发帖距今超过3年,不再开放新的回复
发表回复
COKING 2004-09-12
搞定!谢谢。。。
回复
saucer 2004-09-12
<TABLE DATASRC="#DSO" BORDER=1 id="tbl" onclick="CheckCell()">
...


<script language="javascript">
function CheckCell()
{
var e = event.srcElement;
if (e.tagName != "TABLE")
{
while (e.tagName != "TR")
e = e.parentNode;

if (e.rowIndex && e.rowIndex > 0)
{
DSO.recordset.absolutePosition = e.rowIndex;
}
}
}
</script>
回复
发帖
XML/XSL
创建于2007-09-28

8809

社区成员

XML/XSL相关问题讨论专区
申请成为版主
帖子事件
创建了帖子
2004-09-12 02:32
社区公告
暂无公告