标题: [问题求助] 麻烦同学们帮忙用VBS获取网页上指定按钮的属性值[已解决] [打印本页]
作者: vinespn 时间: 2015-7-29 15:54 标题: 麻烦同学们帮忙用VBS获取网页上指定按钮的属性值[已解决]
本帖最后由 pcl_test 于 2017-4-4 18:28 编辑
大家好,最近学着个VBS和Html,自己写了小段代码,功能是文本框内显示当前鼠标停留所在按钮的Name属性。
代码如下,用的是Javascript 实现的,由于在学习VBS,也希望能用VBS实现这个功能,麻烦大家指点一二。
拜谢。- <html>
- <head>
- <script type=text/javascript>
- function muson(obj){
- T1.value = obj.name
- }
- function musout(obj){
- T1.value = ""
- }
- </script>
- </head>
- <body>
- <input type= "Button" name ="add" value="添加" onmousemove="muson(this)" onMouseOut="musout(this)" />
- <input type= "Button" name ="delete" value="删除" onmousemove="muson(this)" onMouseOut="musout(this)" />
- <input type= "Button" name ="update" value="修改" onmousemove="muson(this)" onMouseOut="musout(this)" />
- <input type= "Button" name ="search" value="查找" onmousemove="muson(this)" onMouseOut="musout(this)" />
- <input type= text name ="T1" >
-
- </body>
- </html>
复制代码
作者: vinespn 时间: 2015-7-29 17:06
- <html>
- <head>
- <script language=vbscript>
-
- </script>
- </head>
- <body>
- <input type= "Button" name ="M4000" value="添加" onmousemove=T1.value="m4000" onMouseOut=T1.value="" />
- <input type= "Button" name ="M4001" value="删除" onmousemove=T1.value="m4001" onMouseOut=T1.value="" />
- <input type= "Button" name ="M4002" value="修改" onmousemove=T1.value="m4002" onMouseOut=T1.value="" />
- <input type= "Button" name ="M4003" value="查找" onmousemove=T1.value="m4003" onMouseOut=T1.value="" />
- <input type= "Button" name ="M4004" value="刷新" onmousemove=T1.value="m4004" onMouseOut=T1.value="" />
- <input type= text name ="T1" >
-
- </body>
- </html>
复制代码
走了一天的弯路,
欢迎光临 批处理之家 (http://bathome.net./) |
Powered by Discuz! 7.2 |