0

我有这段代码,当 i = 9 时出错。对象 T_009 在 html 表单中不存在,但我不明白为什么它会导致它出错,这不是 not is nothing 检查吗?我有几种使用 vbscript 的表单并且没有时间将它们全部转换,所以我坚持它是什么......

dim i, obj_src, obj_dest
for i = 2 to 720
    set obj_src = document.getelementbyid("T_" & lpad(i,"0",3))
    set obj_dest = document.getelementbyid("s" & lpad(i,"0",3))
    if not obj_src is nothing and not obj_dest is nothing then
        obj_dest.innerhtml = obj_src.value
    end if
    set obj_src = nothing
    set obj_dest = nothing
Next
4

1 回答 1

0

我需要启用兼容模式

<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7">
于 2013-10-29T13:52:59.983 回答