貌似里面有中文字符的原因。
ohttp=newobject("microsoft.xmlhttp")
ohttp.open("get","http://localhost/practice/zipper.html")
ohttp.send()
?ohttp.responsetext && 成功获得含中文html文本内容
oxml=newobject("microsoft.xmldom")
oxml.load(ohttp.responsetext)
?oxml.haschildnodes && 依然返回.f.
把上面的zipper.html 换成一个英文的页面myupload.html就可以返回.t.
ohttp.open("get","http://localhost/practice/myupload.html")
ohttp.send()
?ohttp.responsetext && 成功获得含html文本内容
oxml=newobject("microsoft.xmldom")
oxml.load(ohttp.responsetext)
?oxml.haschildnodes && 返回.t.
?oxml.nodename &&返回 #document
?oxml.documentElement.childNodes(0).nodeName && 返回body
?oxml.documentElement.childNodes(0).childnodes(0).nodeName && 返回form
?oxml.documentElement.childNodes(0).childnodes(0).childnodes(0).nodeName && 返回label
?oxml.documentElement.childNodes(0).childnodes(0).childnodes(1).nodeName && 返回input
?oxml.documentElement.childNodes(0).childnodes(0).childnodes(2).nodeName && 返回br
?oxml.documentElement.childNodes(0).childnodes(0).childnodes(3).nodeName && 返回input
以下是myupload.html的内容,返回结果如预期。
<!DOCTYPE html>
<html lang=“zh-CN”>
<body>
<form action="upload_file.php" method="post"
enctype=" multipart/form-data">
<label for="file">Filename:</label>
<input type="file" name="file" id="file" />
<br />
<input type="submit" name="submit" value="Submit" />
</form>
</body>
</html>
这个中文字符问题该怎么解决呢???
[此贴子已经被作者于2022-2-5 12:39编辑过]