【发布时间】:2011-05-28 11:35:37
【问题描述】:
我在 javascript 中使用 responseXML 属性,但它显示 xml 文档 ($strXml) 无效的错误,我不知道我的代码中的问题在哪里,请帮助我
html 文件:
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8"/>
<title>Home Page</title>
<script type="text/javascript" src="code.js"></script>
</head>
<body >
<form>
<input type="text" id="code" name="code" size="10" />
<input name="submit" type = "button" onClick ="check()" value = "check" />
</form>
</body>
</html>
【问题讨论】:
-
试试
application/xml,而不是text/xml。
标签: php javascript html xml