• linkedu视频
  • 平面设计
  • 电脑入门
  • 操作系统
  • 办公应用
  • 电脑硬件
  • 动画设计
  • 3D设计
  • 网页设计
  • CAD设计
  • 影音处理
  • 数据库
  • 程序设计
  • 认证考试
  • 信息管理
  • 信息安全
菜单
linkedu.com
  • 网页制作
  • 数据库
  • 程序设计
  • 操作系统
  • CMS教程
  • 游戏攻略
  • 脚本语言
  • 平面设计
  • 软件教程
  • 网络安全
  • 电脑知识
  • 服务器
  • 视频教程
  • vbs
  • DOS/BAT
  • hta/htc
  • python
  • perl
  • VBA
  • ColdFusion
  • ruby
  • PowerShell
  • Lua
  • Golang
  • linux shell
您的位置:首页 > 脚本语言 >hta/htc > 个人学习之作 hta 原创

个人学习之作 hta 原创

作者:mdxy-dxy 字体:[增加 减小] 来源:互联网

mdxy-dxy 通过本文主要向大家介绍了个人学习之作 hta 原创等相关知识,希望对您有所帮助,也希望大家支持linkedu.com www.linkedu.com

***********************************************************************
'*一直想做一个自己用来学习的东西,可是一直没有时间,本想用asp(用netbox)做的。,我一直
'*想学习程序,vb但没有时间学习,现在想用c#做一个,但没有什么时间,偶尔去官方找vbscript发现
'*这个不错的hta于是花了两三天的时间,做了一个这个,希望大家能喜欢。
'*Author: dxy(reterry)
'*version:1.0
'*QQ: 461478385
'*Email:douxy001@gmail.com
***********************************************************************
//-->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<hta:application
     id="dxymdb"
  scroll="yes"
  singleinstance="yes"
border="thin"
  windowstate="maximize"
icon="dxy.ico"
>
<title>我的第一个hta程序</title>
<style type="text/css">
<!--
BODY
{
  scrollbar-face-color : #D8DBDF;
  scrollbar-highlight-color : #FFFFFF;
  scrollbar-shadow-color : #C1C6CC;
  scrollbar-3dlight-color : #ABB1B3;
  scrollbar-arrow-color : #7F8996;
  scrollbar-track-color : #F8FAF9;
  scrollbar-darkshadow-color : #ABB1B3;
}
body,td,th {
 font-size: 10pt;
 color: #FFFFFF;
}
body {
 background-color: #3a6ead;
}
a {
 font-size: 9pt;
 color: #000000;
}
a:link {
 text-decoration: none;
 color: #FFFF33;
}
a:visited {
 text-decoration: none;
 color: #FFFF33;
}
a:hover {
 text-decoration: none;
 color: #FFffff;
}
a:active {
 text-decoration: none;
}
.style4 {font-weight: bold}
.b {
 border-bottom-width: 1px;
 border-bottom-style: dashed;
 border-bottom-color: #BFDFFF;
}
.style9 {color: #ffff33}
input {

font-size:12px;
}
-->
</style>
</head>
<script language="vbscript">
'加入智能显示信息条数
strComputer = "."
    Set objWMIService = GetObject("Winmgmts:\\" & strComputer & "\root\cimv2")
    Set colItems = objWMIService.ExecQuery("Select * From Win32_DesktopMonitor")
    For Each objItem in colItems
        thewidth = objItem.ScreenWidth
        theheight = objItem.ScreenHeight
    Next
'------------------智能结速-----
const adUserClient=3
sub window_onload()
dim conn
set conn=createobject("adodb.connection")
conn.open "provider=microsoft.jet.oledb.4.0;data source=db.mdb"
set rs=createobject("adodb.recordset")
rs.cursorlocation=adUserClient
sql="select * from theclass order by id desc"
rs.open sql,conn,1,1
rs.movefirst
strclasslist="<select onclick=changeclass() name=theclassname>"
strclasslist=strclasslist+"<option value="&chr(34)&chr(34)&">"
do until rs.eof
strclasslist=strclasslist&"<option value="&chr(34)&rs.fields.item("class_name")&chr(34)&">"&rs.fields.item("class_name")&"</option>"
rs.movenext
loop
strclasslist=strclasslist&"<option value='其它'>其它</option><option value='全部'>全部</option></select>"
classlist.innerHTML=strclasslist
end sub
sub changeclass()
theclass.value=theclassname.value
if theclass.value="全部" then
theclass.value=""
end if
end sub
sub addclass()
classname=inputbox("请输入你要添加的类别","添加类别")
if classname="" then
msgbox "添加的类别不能为空"
exit sub
else
dim conn
set conn=createobject("adodb.connection")
conn.open "provider=microsoft.jet.oledb.4.0;data source=db.mdb"
set rs=createobject("adodb.recordset")
rs.cursorlocation=adUserClient
//sqla="insert into class(class_name)values("&classname&")"
rs.open "theclass",conn,3,3
rs.addnew()
rs("class_name")=classname
rs.update
rs.close
conn.close
msgbox classname&"添加成功",0
end if
call window_onload
end sub

sub delclass()
if confirm("你真的要删除吗?") then
delclassname=theclassname.value
if delclassname="" then
msgbox "要删除的类别不能为空"
exit sub
else
dim conn
set conn=createobject("adodb.connection")
conn.open "provider=microsoft.jet.oledb.4.0;data source=db.mdb"
set rs=createobject("adodb.recordset")
rs.cursorlocation=adUserClient
sqld="delete from theclass where class_name="&chr(39)&delclassname&chr(39)
rs.open sqld,conn,3,3
msgbox chr(34)&delclassname&chr(34)&"删除成功",0
//rs.close
//conn.close
end if
call window_onload
end if
end sub

sub editclass()
theeditclass=theclassname.value
reditclass=inputbox("请输入你要更改后的类别名称","类别修改")
if theeditclass="" or reditclass="" then
exit sub
else
dim conn
set conn=createobject("adodb.connection")
conn.open "provider=microsoft.jet.oledb.4.0;data source=db.mdb"
set rs=createobject("adodb.recordset")
rs.cursorlocation=adUserClient
sqld="update theclass set class_name="&chr(39)&reditclass&chr(39)&" where class_name="&chr(39)&theeditclass&chr(39)
rs.open sqld,conn,3,3
msgbox chr(34)&theeditclass&"-->"&reditclass&chr(34)&"成功修改",0
call window_onload
rs.close
conn.close
end if
end sub

sub window_onUnload
on error resume next
rs.close
conn.close
end sub

sub quitscript
on error resume next
rs.close
conn.close
self.close
end sub

sub unadd()
theclass.value=""
thetitle.value=""
content.value=""
theadd.style.display="none"
end sub

sub addnews()
theadd.style.display="block"
add.disabled=false
theclass.value=theclassname.value
getclass=theclass.value
gettitle=thetitle.value
getcontent=content.value
getisgood=isgood.value
if getisgood="" then
getisgood=0
else
getidgood=1
end if
if getclass<>"" and getclass<>"全部" and gettitle<>"" and getcontent<>"" then
//msgbox gettitle&getcontent
dim conn
set conn=createobject("adodb.connection")
conn.open "provider=microsoft.jet.oledb.4.0;data source=db.mdb"
set rs=createobject("adodb.recordset")
rs.cursorlocation=adUserClient
rs.open "list",conn,3,3
rs.addnew()
rs("title")=gettitle
rs("class_name")=getclass
rs("content")=getcontent
rs("isgood")=getisgood
rs.update
msgbox "恭喜,数据添加成功"
theclass.value=""
thetitle.value=""
content.value=""
end if
//rs.close
//conn.close
end sub

sub searchits()
thesearch=sea

您可能想查找下面的文章:

相关文章

  • hta实现的定时关机小程序
  • 用htc实现CHECKBOX控件
  • HTA编辑HOST文件的脚本
  • 无间断滚动效果 htc
  • 创建一个在标题栏中没有“关闭”按钮的 HTA
  • 网易手机图片自由下载器(hta)
  • A notepad made in HTA(hta实现的记事本)
  • 二进制文件转换为文本工具
  • tweakomatic hta 下载
  • 用htc实现验证模块

文章分类

  • vbs
  • DOS/BAT
  • hta/htc
  • python
  • perl
  • VBA
  • ColdFusion
  • ruby
  • PowerShell
  • Lua
  • Golang
  • linux shell

最近更新的内容

    • 风讯注入exp(hta版)代码发布
    • 无间断滚动效果 htc
    • XMLHttps
    • 用hta[javascript]写的定时重启或关机的小工具
    • 学习正则帮手笨狼正则练习器
    • javascript操作xml(增删改查)例子代码hta版
    • 用来通知论坛有新贴子的hta代码
    • XMLDOM下载者生成器代码(xmldown.hta)
    • A notepad made in HTA(hta实现的记事本)
    • 用htc实现进度条控件

关于我们 - 联系我们 - 免责声明 - 网站地图

©2020-2025 All Rights Reserved. linkedu.com 版权所有