[新手上路]批处理新手入门导读[视频教程]批处理基础视频教程[视频教程]VBS基础视频教程[批处理精品]批处理版照片整理器
[批处理精品]纯批处理备份&还原驱动[批处理精品]CMD命令50条不能说的秘密[在线下载]第三方命令行工具[在线帮助]VBScript / JScript 在线参考
返回列表 发帖

[分享]利用按钮在hta文件窗口显示图片

  1. <html>
  2. <head>
  3. <hta:application id="invbs" application scroll="no"/>
  4. <!--点击load按钮,在hta文件的窗口显示图片。作者:myzam 2011-3-16
  5.    html的图片框com的类id为:4C599241-6926-101B-9992-00000B65C6F9。
  6. ' 你可以通过注册表输入image查询得到。
  7. '  object标签相当于vbs的createobject
  8. '  loadpicture是vbs的函数。-->
  9. </head>
  10. <body style="background:buttonface">
  11. <object id="button1" classid="clsid:4C599241-6926-101B-9992-00000B65C6F9" >    style="width:50;height:50"
  12.   </object>
  13. <input type="button" name="button2" value="load" style="width:100;height:50"  onclick="f()"/>
  14. <script language="vbscript">
  15.   sub f
  16.    button1.picture=loadpicture("d:\sunset.jpg")
  17.   end sub
  18. </script>   
  19. </body>
  20. </html>
复制代码
  1. <html>
  2. <head>
  3. <hta:application id="invbs" applicationname="13" scroll="no"/>
  4. </head>
  5. <body style="background:buttonface">
  6. <input type="image" name="image1" src="d:\sunset.jpg" width=100 height=100 >
  7. </body>
复制代码
  1.   <html>
  2. <head>
  3. <hta:application id="invbs" applicationname="13" scroll="no"/>
  4. </head>
  5. <body>
  6. <image type="image" name="img"  style="width:200;height:200" />
  7. <input type="button" name="button1" />
  8. <script language="vbscript">
  9.   sub button1_onclick
  10.       img.src="d:\sunset.jpg"
  11.    end sub
  12. </script>
  13. </body>
  14. </html>
复制代码
[ 本帖最后由 myzam 于 2011-3-18 23:59 编辑 ]

返回列表