以文本方式查看主题

-  中文XML论坛 - 专业的XML技术讨论区  (http://bbs.xml.org.cn/index.asp)
--  『 DOM/SAX/XPath 』  (http://bbs.xml.org.cn/list.asp?boardid=11)
----  [求助]请各位大虾指教!Javascript中实现对XML文件中数据的增、删、改、查~`~~~`~  (http://bbs.xml.org.cn/dispbbs.asp?boardid=11&rootid=&id=41365)


--  作者:king7jdx
--  发布时间:12/18/2006 7:46:00 PM

--  [求助]请各位大虾指教!Javascript中实现对XML文件中数据的增、删、改、查~`~~~`~

帮帮小弟哇~~~~~

偶的myxml.xml文件:
<?xml version="1.0" encoding="gb2312"?>
<my>
    <username>j001/username>
    <password>123</password>
</my>

想在login.html文件中实现对myxml.xml中数据的操作~~~~~~
我的login.html文件:
<html>
<head>
</head>
<XML id="myxml" src="myxml.xml"></XML>  //用数据岛的方法,谢谢!~~~
<script language="javascript">

function check()
{
     //请热心的大虾man,把查的代码写在这里,谢谢~~~~~~~~~~~~
}

function addnew()
{
    //请热心的大虾man,把添加的代码写在这里,谢谢~~~~~~~~~~~~
}

function removeuse()
{
  //请热心的大虾man,把删的代码写在这里,谢谢~~~~~~~~~~~~
}

alert("anyway 谢谢您的帮助!~_~");

</script>
<body>
<p>UserName:</p>
<input type ="text" id="username_text" size="10"></input>
<p>Password</p>
<input type ="password" id="password_text"></input>
<p></p>
<input type ="button" onclick="check()" value="确定"></input>
<input type ="button" onclick="check()" value="确定"></input>
<input type ="button" onclick="check()" value="确定"></input>
</body>
</html>


--  作者:king7jdx
--  发布时间:12/18/2006 7:49:00 PM

--  
不好意思~~<input>按钮写重了
改为:
<input type ="button" onclick="check()" value="确定"></input>
<input type ="button" onclick="addnew()" value="添加"></input>
<input type ="button" onclick="removeuse()" value="删除"></input>
W 3 C h i n a ( since 2003 ) 旗 下 站 点
苏ICP备05006046号《全国人大常委会关于维护互联网安全的决定》《计算机信息网络国际联网安全保护管理办法》
1,679.688ms