使用方法:保存為asptools.hta然後再運行
代碼如下:
<! doctype html public' - // W3C // DTD XHTML 1.0 Transitional // en'“” http://www.w.org/tr/tr/xhtml1/dtd/xhtml1--
transitional.dtd“>
<html xmlns =“ http://www.w3.org/1999/xhtml”>
<頭>
<meta http-equiv =“ content-type” content =“ text /html; charset = gb2312” />
<meta name =“作者” content =“柳永法” />
<title> ASP </title>
<樣式>車身{font-size:12px} </style>
<hta:應用程序
id =“ asptools”
ApplicationName =“ Asptools”
滾動=“否”
singleSinstance =“是”
WindowState =“正常”
>
</head>
<身體>
<div>
<input type =“ file” id =“ txtfile” onChange =“ createtableselect('access')” style =“ display:none” />
ip:<input type =“ text” name =“ ip” size =“ 16”樣式=“邊界:1px固體綠色”值=” ./ sql2005“ />
登錄名:<input type =“ text” name =“ userId” size =“ 10”樣式=“ border =” border:1px固體綠色“ value” value =“ sa” />
密碼:<input type =“密碼” name =“ pwd” size =“ 10” style =“ border =” border:1px實心綠色“ value” value =“ yongfa365” />
數據庫名:<input type =“ text” name =“ dbname” size =“ 10” style =“ border:1px固體綠色”值=“ HB605-8-8” /> <br />
<input name =“ button2” type =“ button” id =“ button2” style =“ border =” border:1px固體綠色“ onclick =” createTablesElect
('mssql')“ value =”連接sql數據庫“ />
<input type =“ button” id =“ btnfromfile” onclick =“ txtfile.click()” value =“連接訪問” style =“ border =” border:1px solid
綠色” />
<span ID =“表”> </span>
<hr />
模板:
<input type =“ text” id =“ opt” value =“” size =“ 40” />
<select size =“ 1”
<input name =“ button” type =“ button” id =“ button” onclick =“ c()” value =“ tyled” style =“ border =” border:1px固體綠色“>
<hr />
<textarea id =“ s” lows =“ 10” cols =“ 80”> </textarea>
<input type =“ button” onclick =“ madesql()” value =“ sql s style =” border =“ border:1px固體綠色” />
<textarea id =“ d” rows =“ 10” cols =“ 80”> </textarea>
</div>
<pre id =“ sqldemo” style =“ display:none” into =“通用建表結構”>
- 通用建表結構
創建表[DBO]。 [tableName](
[id] int主鍵身份(1,1), - id,主鍵,自動號
[txttitle] varchar(255), - 標題
[txtContent]文字, - 內容
[puttime] dateTime默認值(getDate()), - 提交時間
[moditime] dateTime默認(getDate()), - 修改時間
[命中] int默認(0), - 點擊數
[flags] int默認(0), - 標識
[orderid] int默認(0), - 排序號
)
</pre>
<pre id =“ sdemo” style =“ display:none” into =“初始源測試數據”>