| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 1288 人关注过本帖
标题:菜单连接和下接菜单连接的代码怎样写?
只看楼主 加入收藏
雨夜秋风
Rank: 1
等 级:新手上路
帖 子:31
专家分:0
注 册:2010-5-19
结帖率:40%
收藏
已结贴  问题点数:5 回复次数:11 
菜单连接和下接菜单连接的代码怎样写?
<html>
<head>
<hta:application
border="dialog"
borderstyle="normal"
caption="yes"
contextmenu="no"
maximizebutton="no"
minimizebutton="no"
navigable="no"
scroll="no"
selection="no"
showintaskbar="yes"
singleinstance="yes"
sysmenu="yes"
version="1.0"
windowstate="normal"
>
<body style="margin:0">
<center><table cellpadding=0 cellspacing=0 borderColorLight=#aaaaee border=8 WIDTH=100% align=center table background="123.jpg" width=0><tr><td><center>
<title>U盘工具集</title><!--这里是标题-->
<hta:application sysmenu=no scroll=no border=none>
<script language="vbscript">
sub sub1
  me.close
end sub
me.resizeto 450,310  '这里设置窗口大小,单位为像素
me.moveto 260,100  '这里设置窗口位置,单位为像素
</script>
<input type=button value=FAT32格式化 Click()>
<input type=button value=FAT格式化 Click()>
<input type=button value=复制工具 Click()>
<input type=button value=老化工具 Click()>
<br><br><br>
<CENTER>
<FONT style="COLOR:#33FF00; FILTER: shadow(color=black); FONT-FAMILY: 华文彩云; FONT-SIZE: 30pt; LINE-HEIGHT: 150%; WIDTH: 100%"></FONT></CENTER>
<style type="text/css">.3dfont { FILTER: glow(color=ffffff,strength=0) shadow(color=cccccc,direction:135); POSITION: relative; WIDTH: 100% }
</style>
<table border="0" width="100%">
<tr>
<td width="100%" class="3dfont"><font color=RED></font>
<P align=left>
  <font color=green>既不回头 何必不忘 </font></B><br><br>
           <font color=purple>既然无缘 何需誓言 </font></B><br><br>
  <font color=blue>今日种种 似水无痕 </font></B><br><br>
           <font color=mediumvioletred>明夕何夕 君已陌路 </font></B>
</html>
<input type=button value=FAT32格式化 Click()>
<input type=button value=FAT格式化 Click()>
<input type=button value=复制工具 Click()>
<input type=button value=老化工具 Click()>
上面4个怎样做成连接的呢?我要点击“FAT32格式化”就可以打开FAT32格式化的BAT文件。点击“老化工具”就打开老
化工具EXE的文件。大虾门帮帮忙的哦。谢了!

[ 本帖最后由 雨夜秋风 于 2010-6-14 15:14 编辑 ]
搜索更多相关主题的帖子: 菜单 代码 
2010-06-14 10:18
icecool
Rank: 9Rank: 9Rank: 9
等 级:贵宾
威 望:20
帖 子:1215
专家分:1376
注 册:2005-3-14
收藏
得分:0 
你需要写出调用各工具的函数,
再在各个对应的button上进行函数的调用。

http://toorup.3v.do
loading...
2010-06-14 10:36
雨夜秋风
Rank: 1
等 级:新手上路
帖 子:31
专家分:0
注 册:2010-5-19
收藏
得分:0 
回复 2楼 icecool
我不知道代码是怎样的哦!
你写一下出来好吗?
2010-06-14 11:42
雨夜秋风
Rank: 1
等 级:新手上路
帖 子:31
专家分:0
注 册:2010-5-19
收藏
得分:0 
大虾帮帮忙的哦!帮我写一下出来
2010-06-14 16:36
icecool
Rank: 9Rank: 9Rank: 9
等 级:贵宾
威 望:20
帖 子:1215
专家分:1376
注 册:2005-3-14
收藏
得分:0 
我知道你的各个工具是什么样的,下面给你的例子看一下:

<script   language="javascript">
function open_tool(tem_key)
{
     if(tem_key=="format_tool"){
               var strPath="file:///C|/windows/system32/cmd.exe"; } //这里设置你所调用程序的路径
     if(tem_key=="copy"){
               var strPath="file:///C|/windows/system32/dxdiag.exe";}
   

          var objShell = new ActiveXObject("wscript.shell");      
          objShell.Run(strPath);      
          objShell = null;   
}
</script>


<input type="button" value="FAT32格式化" onclick="open_tool('format_tool')">
<input type=button value=FAT格式化 Click()>
<input type=button value=复制工具 Click()>
<input type=button value=老化工具 Click()>

 

http://toorup.3v.do
loading...
2010-06-14 17:24
雨夜秋风
Rank: 1
等 级:新手上路
帖 子:31
专家分:0
注 册:2010-5-19
收藏
得分:0 
回复 5楼 icecool
图片附件: 游客没有浏览图片的权限,请 登录注册

那几个文件我已经做好的了。点击FAT32格式化就运行FAT32.exe
点击老化工具就运行IWTBurnIn-v2975.exe的哦。我就差这一点了
就请你帮忙写完的啦!谢了!
2010-06-14 19:15
icecool
Rank: 9Rank: 9Rank: 9
等 级:贵宾
威 望:20
帖 子:1215
专家分:1376
注 册:2005-3-14
收藏
得分:0 
你要把路径给出来才行.

http://toorup.3v.do
loading...
2010-06-14 20:05
雨夜秋风
Rank: 1
等 级:新手上路
帖 子:31
专家分:0
注 册:2010-5-19
收藏
得分:0 
回复 7楼 icecool
就桌面有个U盘工具集进去就是 那些文件的了。
不是编好这个文件放在一起就行了吗?
2010-06-14 20:15
雨夜秋风
Rank: 1
等 级:新手上路
帖 子:31
专家分:0
注 册:2010-5-19
收藏
得分:0 
回复 7楼 icecool
同一个文件夹不是只用文件名就可以了吗?
怎么还要路径的呢?
2010-06-14 20:31
icecool
Rank: 9Rank: 9Rank: 9
等 级:贵宾
威 望:20
帖 子:1215
专家分:1376
注 册:2005-3-14
收藏
得分:5 
我不知你是以怎么样的方式运行,如果是单文件不用服务解析,那么下面这样应该是你要的:
<html>
<head>
<hta:application
border="dialog"
borderstyle="normal"
caption="yes"
contextmenu="no"
maximizebutton="no"
minimizebutton="no"
navigable="no"
scroll="no"
selection="no"
showintaskbar="yes"
singleinstance="yes"
sysmenu="yes"
version="1.0"
windowstate="normal"
>
<body style="margin:0">
<center><table cellpadding=0 cellspacing=0 borderColorLight=#aaaaee border=8 WIDTH=100% align=center table background="123.jpg" width=0><tr><td><center>
<title>U盘工具集</title><!--这里是标题-->
<hta:application sysmenu=no scroll=no border=none>
<script language="vbscript">
sub sub1
  me.close
end sub
me.resizeto 450,310  '这里设置窗口大小,单位为像素
me.moveto 260,100  '这里设置窗口位置,单位为像素
</script>
<input type=button value=FAT32格式化 Click()>
<input type=button value=FAT格式化 Click()>
<input type=button value=复制工具 Click()>
<input type=button value=老化工具 Click()>
<br><br><br>
<CENTER>
<FONT style="COLOR:#33FF00; FILTER: shadow(color=black); FONT-FAMILY: 华文彩云; FONT-SIZE: 30pt; LINE-HEIGHT: 150%; WIDTH: 100%"></FONT></CENTER>
<style type="text/css">.3dfont { FILTER: glow(color=ffffff,strength=0) shadow(color=cccccc,direction:135); POSITION: relative; WIDTH: 100% }
</style>
<table border="0" width="100%">
<tr>
<td width="100%" class="3dfont"><font color=RED></font>
<P align=left>
  <font color=green>既不回头 何必不忘 </font></B><br><br>
           <font color=purple>既然无缘 何需誓言 </font></B><br><br>
  <font color=blue>今日种种 似水无痕 </font></B><br><br>
           <font color=mediumvioletred>明夕何夕 君已陌路 </font></B>
</html>
<input type="button" value="FAT32格式化" onclick="open_tool('format_tool32')">
<input type="button" value="FAT格式化" onclick="open_tool('format_tool')">
<input type="button" value="复制工具" onclick="open_tool('copy')">
<input type="button" value="老化工具" onclick="open_tool('old_tool')">


<script   language="javascript">
function open_tool(tem_key)
{

var tem_href;
var file_path;
var tem_file;
tem_href=document.location.href;
tem_file=location.href.match(/\/([^\?/]*)(\?|$)/)[1];  
file_path=tem_href.replace(tem_file,"");

     if(tem_key=="format_tool32"){
               var strPath=file_path + "fat32.exe";}
     if(tem_key=="format_tool"){
               var strPath=file_path + "fat.exe";}
     if(tem_key=="copy"){
               var strPath=file_path + "copy.exe";}
     if(tem_key=="old_tool"){
               var strPath=file_path + "IWTBurnIn.exe";}
   
          var objShell = new ActiveXObject("wscript.shell");      
          objShell.Run(strPath);      
          objShell = null;   
}
</script>


http://toorup.3v.do
loading...
2010-06-14 22:48
快速回复:菜单连接和下接菜单连接的代码怎样写?
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.020205 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved