请哪位高手帮我把下面的VBScript改成javascript,在下感激不尽!
<script language="VBScript">
function display1(num)
dim imagename
dim name
dim total
if(num<10) then
if document.all("subtree"+chr(48+num)).style.display="none" then
document.all("subtree"+chr(48+num)).style.display=""
document.all("image"+chr(48+num)).src="image/t_sub.gif"
document.all("img"+chr(48+num)).src="image/open.gif"
else
document.all("subtree"+chr(48+num)).style.display="none"
document.all("image"+chr(48+num)).src="image/t_plus.gif"
document.all("img"+chr(48+num)).src="image/close(1).gif"
end if
end if
if(num>9) then
if document.all("subtree"+chr(49)+chr(48+num-10)).style.display="none" then
document.all("subtree"+chr(49)+chr(48+num-10)).style.display=""
document.all("image"+chr(49)+chr(48+num-10)).src="image/t_sub.gif"
document.all("img"+chr(49)+chr(48+num-10)).src="image/open.gif"
else
document.all("subtree"+chr(49)+chr(48+num-10)).style.display="none"
document.all("image"+chr(49)+chr(48+num-10)).src="image/t_plus.gif"
document.all("img"+chr(49)+chr(48+num-10)).src="image/close(1).gif"
end if
end if
end function
</script>
function display1(num)
dim imagename
dim name
dim total
if(num<10) then
if document.all("subtree"+chr(48+num)).style.display="none" then
document.all("subtree"+chr(48+num)).style.display=""
document.all("image"+chr(48+num)).src="image/t_sub.gif"
document.all("img"+chr(48+num)).src="image/open.gif"
else
document.all("subtree"+chr(48+num)).style.display="none"
document.all("image"+chr(48+num)).src="image/t_plus.gif"
document.all("img"+chr(48+num)).src="image/close(1).gif"
end if
end if
if(num>9) then
if document.all("subtree"+chr(49)+chr(48+num-10)).style.display="none" then
document.all("subtree"+chr(49)+chr(48+num-10)).style.display=""
document.all("image"+chr(49)+chr(48+num-10)).src="image/t_sub.gif"
document.all("img"+chr(49)+chr(48+num-10)).src="image/open.gif"
else
document.all("subtree"+chr(49)+chr(48+num-10)).style.display="none"
document.all("image"+chr(49)+chr(48+num-10)).src="image/t_plus.gif"
document.all("img"+chr(49)+chr(48+num-10)).src="image/close(1).gif"
end if
end if
end function
</script>
...全文
相关推荐
easyui-demo:简单的用户界面沙盒
easyui-demo 简单的用户界面沙盒 以 JSON 格式回答的 javax.servlet POM.xml 通过 maven 构建项目 集成码头在本地运行 调用示例:
jquery-easyui完整demo演示
jquery-easyui完整demo演示
Jquery EasyUI 页面框架Demo
Jquery EasyUI 页面框架Demo,共4个
easyUI简单登录demo
利用jquery_easyUI的框架做的一个登录小demo,比较适合新手
SpringMvc+Mybatis+缓存+easyui小demo
这是我写的springmvc小例子,涉及mybatis、easyui、json、缓存、拦截器等知识。免费分享给大家,如果觉得好,还望给个好评,谢谢啦


