急,希望高手能帮忙! colDoc1.selectSingleNode?? do you mean colDoc1.selectNodes ? 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 1. your xpath is wrongvar items = colDoc1.selectSingleNode("/col/uc[ID ='" + locationid + "']");2. always check for null, for examplevar items = colDoc1.selectSingleNode("/col/uc[ID ='" + locationid + "']");if (items != null){ //do work} var items = colDoc1.selectSingleNode("\col\uc[ID ='" + locationid + "']"); ---> var items = colDoc1.selectSingleNode("//col//uc[ID ='" + locationid + "']"); 高难度的javascript正则解析问题 js查找字符串替换 JS 赋值 赋值变量 带与不带VAR的区别 怎么样把一个body以参数的形式传过去 全国省份、城市、城镇(辖区)方便调用的JS控件 为什么我使用window.open打开的窗口我自己看不到状态栏,但是别人访问就看得到了? 求助:关于for循环 简单问题 我知道公历转换到农历,但是不知道农历转换到公历。 js导出Excel 内容不对 并且乱码 为什么没有vbscript版啊? 在不知表单类型的情况下设置其VALUE的函数
if (items != null)
{
//do work
}
--->
var items = colDoc1.selectSingleNode("//col//uc[ID ='" + locationid + "']");