找回密码
 注册
搜索
[新手上路]批处理新手入门导读[视频教程]批处理基础视频教程[视频教程]VBS基础视频教程[批处理精品]批处理版照片整理器
[批处理精品]纯批处理备份&还原驱动[批处理精品]CMD命令50条不能说的秘密[在线下载]第三方命令行工具[在线帮助]VBScript / JScript 在线参考
查看: 14502|回复: 1

[问题求助] 麻烦同学们帮忙用VBS获取网页上指定按钮的属性值[已解决]

[复制链接]
发表于 2015-7-29 15:54:11 | 显示全部楼层 |阅读模式
本帖最后由 pcl_test 于 2017-4-4 18:28 编辑

大家好,最近学着个VBS和Html,自己写了小段代码,功能是文本框内显示当前鼠标停留所在按钮的Name属性。
代码如下,用的是Javascript 实现的,由于在学习VBS,也希望能用VBS实现这个功能,麻烦大家指点一二。
拜谢。
  1. <html>
  2.          <head>
  3. <script  type=text/javascript>
  4. function muson(obj){
  5. T1.value = obj.name
  6. }
  7. function musout(obj){
  8. T1.value = ""
  9. }
  10. </script>
  11.          </head>
  12.   <body>
  13. <input type= "Button" name ="add"    value="添加"  onmousemove="muson(this)" onMouseOut="musout(this)" />
  14. <input type= "Button" name ="delete" value="删除"  onmousemove="muson(this)" onMouseOut="musout(this)" />
  15. <input type= "Button" name ="update" value="修改"  onmousemove="muson(this)" onMouseOut="musout(this)" />
  16. <input type= "Button" name ="search" value="查找"  onmousemove="muson(this)" onMouseOut="musout(this)" />
  17. <input type= text          name ="T1"        >

  18.   </body>
  19. </html>
复制代码

评分

参与人数 1PB +2 收起 理由
Batcher + 2 感谢给帖子标题标注[已解决]字样

查看全部评分

 楼主| 发表于 2015-7-29 17:06:52 | 显示全部楼层

  1. <html>
  2.          <head>
  3. <script   language=vbscript>

  4. </script>
  5.          </head>
  6.   <body>
  7. <input type= "Button" name ="M4000" value="添加"  onmousemove=T1.value="m4000" onMouseOut=T1.value="" />
  8. <input type= "Button" name ="M4001" value="删除"  onmousemove=T1.value="m4001" onMouseOut=T1.value="" />
  9. <input type= "Button" name ="M4002" value="修改"  onmousemove=T1.value="m4002" onMouseOut=T1.value="" />
  10. <input type= "Button" name ="M4003" value="查找"  onmousemove=T1.value="m4003" onMouseOut=T1.value="" />
  11. <input type= "Button" name ="M4004" value="刷新"  onmousemove=T1.value="m4004" onMouseOut=T1.value="" />
  12. <input type= text          name ="T1"        >

  13.   </body>
  14. </html>
复制代码
走了一天的弯路,
您需要登录后才可以回帖 登录 | 注册

本版积分规则

Archiver|手机版|小黑屋|批处理之家 ( 渝ICP备10000708号 )

GMT+8, 2026-3-17 11:48 , Processed in 0.008853 second(s), 9 queries , File On.

Powered by Discuz! X3.5

© 2001-2026 Discuz! Team.

快速回复 返回顶部 返回列表