1、浏览器无法运行JAVA脚本的解决方法。
rundll32.exe advpack.dll /DelNodeRunDLL32 %systemroot%System32dacui.dll
rundll32.exe advpack.dll /DelNodeRunDLL32 %systemroot%Catrooticatalog.mdb
regsvr32 /s comcat.dll
regsvr32 /s asctrls.ocx
regsvr32 /s oleaut32.dll
regsvr32 /s shdocvw.dll /I
regsvr32 /s shdocvw.dll
regsvr32 /s browseui.dll
regsvr32 /s browseui.dll /I
regsvr32 /s msrating.dll
regsvr32 /s mlang.dll
regsvr32 /s hlink.dll
regsvr32 /s mshtml.dll
regsvr32 /s mshtmled.dll
regsvr32 /s urlmon.dll
regsvr32 /s plugin.ocx
regsvr32 /s sendmail.dll
regsvr32 /s mshtml.dll /i
regsvr32 /s scrobj.dll
regsvr32 /s corpol.dll
regsvr32 /s jscript.dll
regsvr32 /s msxml.dll
regsvr32 /s imgutil.dll
regsvr32 /s cryptext.dll
regsvr32 /s inseng.dll
regsvr32 /s iesetup.dll /i
regsvr32 /s cryptdlg.dll
regsvr32 /s actxprxy.dll
regsvr32 /s dispex.dll
regsvr32 /s occache.dll
regsvr32 /s iepeers.dll
regsvr32 /s urlmon.dll /i
regsvr32 /s cdfview.dll
regsvr32 /s webcheck.dll
regsvr32 /s mobsync.dll
regsvr32 /s pngfilt.dll
regsvr32 /s licmgr10.dll
regsvr32 /s hhctrl.ocx
regsvr32 /s inetcfg.dll
regsvr32 /s trialoc.dll
regsvr32 /s tdc.ocx
regsvr32 /s MSR2C.DLL
regsvr32 /s msident.dll
regsvr32 /s msieftp.dll
regsvr32 /s xmsconf.ocx
regsvr32 /s ils.dll
regsvr32 /s msoeacct.dll
regsvr32 /s wab32.dll
regsvr32 /s wabimp.dll
regsvr32 /s wabfind.dll
regsvr32 /s oemiglib.dll
regsvr32 /s directdb.dll
regsvr32 /s inetcomm.dll
regsvr32 /s msoe.dll
regsvr32 /s oeimport.dll
regsvr32 /s msdxm.ocx
regsvr32 /s dxmasf.dll
regsvr32 /s laprxy.dll
regsvr32 /s l3codecx.ax
regsvr32 /s acelpdec.ax
regsvr32 /s mpg4ds32.ax
regsvr32 /s danim.dll
regsvr32 /s Daxctle.ocx
regsvr32 /s lmrt.dll
regsvr32 /s datime.dll
regsvr32 /s dxtrans.dll
regsvr32 /s dxtmsft.dll
regsvr32 /s wshom.ocx
regsvr32 /s wshext.dll
regsvr32 /s vbscript.dll
regsvr32 /s scrrun.dll mstinit.exe /setup
regsvr32 /s msnsspc.dll /SspcCreateSspiReg
regsvr32 /s msapsspc.dll /SspcCreateSspiReg
echo 修复成功!任意键退出!
pause>nul
///改为.bat扩展名然后运行就OK了.
2、XP正版验证序列号
cdkey: BYCMB-R844W-KJBQX-J3D9F-V3Y6G
DFXFM-DKWTG-MYDWJ-68DQF-YBCYG
TB7JC-3VJKY-J3VMR-PP8TP-HMTWY
KR88V-RCBCB-D78QP-V4FF9-JW77M
3、IE无法打开新窗口解决方法
1、在“开始”菜单中打开“运行”窗口,在其中输入“regsvr32 actxprxy.dll”,然后“确定”,接着会出现一个信息对话框“DllRegisterServ erinactxprxy.dllsucceeded”,再次点击“确定”。
2、再次打开“运行”窗口,输入“regsvr32 shdocvw.dll”,“确定”后在出现的信息对话框中点击“确定”。
3、重新启动Windows,运行IE,随便打开一个网页,点击一个超链接,你会发现IE又能打开新窗口。再试试用鼠标右键选择“在新窗口打开”,问题解决。如果还不能解决此问题,建议再将以下其它几个dll文件进行注册。
主要注册以下几个dll文件:
regsvr32mshtml.dll
regsvr32urlmon.dll
regsvr32msjava.dll
regsvr32shdocvw.dll
regsvr32browseui.dll
regsvr32actxprxy.dll
regsvr32oleaut32.dll
regsvr32shell32.dll
4、将文本输入框的背景设置成透明
<input style="background-color: transparent">
5、让新窗口居中显示
<script language=javascript>
<!--
function MM_openBrWindow( url, winName, width, height)
{
xposition=0; yposition=0;
if ((parseInt(navigator.appVersion) >= 4 ))
{
xposition = (screen.width - width) / 2;
yposition = (screen.height - height) / 2;
}
theproperty= "width=" + width + ","
+ "height=" + height + ","
+ "location=0,"
+ "menubar=0,"
+ "resizable=1,"
+ "scrollbars=0,"
+ "status=0,"
+ "titlebar=0,"
+ "toolbar=0,"
+ "hotkeys=0,"
+ "screenx=" + xposition + "," //仅适用于Netscape
+ "screeny=" + yposition + "," //仅适用于Netscape
+ "left=" + xposition + "," //IE
+ "top=" + yposition; //IE
window.open( url,winName,theproperty );
}
//-->
</script>
<a onClick="MM_openBrWindow('http:///','','width=420,height=390')">点击新窗口</a>
6、“系统将要在XX秒后关机”对于这可以使用命令阻止其关机
点开运行-->输入shutdown -a即可阻止
7、将全角的字符转变成半角字符,将半角转变成全角
<%
Function DSConvert(vString,vFlag)
Rem vFlag为0时表示从全角转为半角,为其他时表示从半角转为全角
Dim i,tmpSingleCharaASC,TempResult,SAscString,DAscString
SAscString = "1,2,3,4,5,6,7,8,14,15,16,17,18,19,20,21,22,23,24,25,26,27,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126"
DAscString = "-23679,-23678,-23677,-23676,-23675,-23674,-23673,-23672,-23666,-23665,-23664,-23663,-23662,-23661,-23660,-23659,-23658,-23657,-23656,-23655,-23654,-23653,-23647,-23646,-23645,-23644,-23643,-23642,-23641,-23640,-23639,-23638,-23637,-23636,-23635,-23634,-23633,-23632,-23631,-23630,-23629,-23628,-23627,-23626,-23625,-23624,-23623,-23622,-23621,-23620,-23619,-23618,-23617,-23616,-23615,-23614,-23613,-23612,-23611,-23610,-23609,-23608,-23607,-23606,-23605,-23604,-23603,-23602,-23601,-23600,-23599,-23598,-23597,-23596,-23595,-23594,-23593,-23592,-23591,-23590,-23589,-23588,-23587,-23586,-23585,-23584,-23583,-23582,-23581,-23580,-23579,-23578,-23577,-23576,-23575,-23574,-23573,-23572,-23571,-23570,-23569,-23568,-23567,-23566,-23565,-23564,-23563,-23562,-23561,-23560,-23559,-23558,-23557,-23556,-23555,-23554"
TempResult = ""
If Len(vString) <= 0 Then Response.Write "Parameters Error! Please Check Your Parameters!" : Response.End : Exit Function
For i=1 to Len(vString)
tmpSingleCharaASC = Asc(Mid(vString,i,1))
If vFlag = 0 Then
If InStr(DAscString,tmpSingleCharaASC) <> 0 and len(Cstr(tmpSingleCharaASC)) = 6 Then
TempResult = TempResult & Chr(tmpSingleCharaASC+23680)
Else
TempResult = TempResult & Chr(tmpSingleCharaASC)
End If
Else
If InStr(SAscString,tmpSingleCharaASC) <> 0 and Len(Cstr(tmpSingleCharaASC))<=4 Then
TempResult = TempResult & Chr(tmpSingleCharaASC-23680)
Else
TempResult = TempResult & Chr(tmpSingleCharaASC)
End If
End If
Next
DSConvert = TempResult
End Function
%>
全角转半角
<%= DSConvert("1234566465454",0)%>
半角转全角
<%= DSConvert("1234567890132131",1)%>
8、CInt() 将一个表达式转化为数字类型 CStr() 将一个表达式转化为字符串.
9、单击一个姓名,然后在文本框中显示
<span onclick="document.getElementById('target').value=this.innerText">小刚</span>
<input type="text" id="target">
10、用相对定位和负向移动完成图片象框阴影
<style>
.out {
position:relative;
background:#bbb;
margin:10px auto;
width:285px
}
.in {
background:#fff;
border:1px solid #555;
padding:5px 5px;
position:relative;
top:-5px;
left:-5px;
}
</style><div class="out"> <div class="in" > <img src="http://www.makewing.com/lanren/jscode/js-0058/images/01.jpg" alt="" /> </div></div>
11、在已有数据库中创建表
<% set conn=server.CreateObject("adodb.connection")
sql="provider=microsoft.jet.oledb.4.0;data source="&server.MapPath("BOOK.mdb")
conn.open sql
Conn.Execute("create table bbb(id AUTOINCREMENT(1,1),p_id text(100),ee money,ff datetime default date(),gg guid,hh single default 50,ii double,jj smallint,kk long,ll image,mm memo,oo yesno not null,pp TINYINT,qq numeric(18,4),aa binary,bb bit,cc smallint,)")
%>
◆'将a表另外复制一个b表(只复制结构,不含数据)
<%
Set rs= Server.CreateObject("ADODB.Recordset")
sql="select * into b from a where 1=0"
rs.open sql,conn,1,1
rs.update
rs.close
set rs=nothing
%>
◆'将a表另外复制一个b表(包括制结构和数据)
<%
Set rs= Server.CreateObject("ADODB.Recordset")
sql="select * into b from a
rs.open sql,conn,1,1
rs.update
rs.close
set rs=nothing
%>
12、新建数据库并新建表
<%
'首先建立一个数据库文件
set conn=server.createobject("adox.catalog")
conn.create "provider=microsoft.jet.oledb.4.0;"&"data source="&server.mappath("lifeda1.mdb")
%>
<%
'向该数据库中建立相应表格
set rs=server.createobject("adox.table")
'该表格名称
rs.name="aaaa"
'该表格字段(字段类型见相关附录)
rs.columns.append "id" ,3
rs.columns.append "liuyan",203
rs.columns.append "dt",7
conn.tables.append rs
set rs=nothing
%>
至此,表格建立完毕。希望能对您有帮助。
字段类型附录
203 备注
7 日期/时间
128 二进制
11 布尔
6 货币
133 日期
134 时间
135 日期时间
5 双精度
4 单精度
3 数字
204 二进制
202 字符串
13、显示框架内的指定位置
<div style='width:300px;height:300px;'><iframe src='http://163.com' style='margin:-100px;width:100%;height:100%'></iframe></div>
14、加密与解密函数
<%function decrypt(dcode)
dim texts
dim i
for i=1 to len(dcode)
texts=texts & chr(asc(mid(dcode,i,2))-i)
next
decrypt=texts
end function
function encrypt(ecode)
Dim texts
dim i
for i=1 to len(ecode)
texts=texts & chr(asc(mid(ecode,i,2))+i)
next
encrypt = texts
end function
%>
<%=decrypt(123123)%>
<a href="11111.asp?id=<%=decrypt("sdfasdfs")%>">111111111</a>
<%abc=encrypt(request("id"))%><%=abc%>
15、当前页地址
<%dim urlname
urlname=Request.ServerVariables("QUERY_STRING")%>
<%=Request.ServerVariables("SCRIPT_NAME")%><%if urlname<>"" then%>?<%=urlname%><%end if%>
16、改变文本框的属性(确定按钮)
<form id="form1" name="form1" method="post" action="">
<input name="text" type="text" value="sdafasdfasdf" id="name"/>
<input type="button" name="Submit" value="更改" onClick="tot()"/>
</form>
<SCRIPT LANGUAGE="JavaScript">
<!--
function tot()
{
if (document.form1.name.disabled == true)
{
document.all.name.disabled=false;
}
else
{
document.all.name.disabled=true;
}
}
//-->
</SCRIPT>
注:以下的readOnly的O必须为大写r必须为小写
<SCRIPT LANGUAGE="JavaScript">
<!--
function tot()
{
if (document.all.name.readOnly == true)
{
document.all.name.readOnly=false;
}
else
{
document.all.name.readOnly=true;
}
}
//-->
</SCRIPT>
17、改变文本框的属性(单选按钮)
<script language="javascript">
<!--
function cStyleshow()
{
document.all.name.disabled=false;
}
function cStylehidde()
{
document.all.name.disabled=true;
}
-->
</script>
<input name='a1' type='radio' value='yes' checked onclick='cStyleshow()'>1
<input name='a1' type='radio' value='no' checked onclick='cStylehidde()'>2
<input name="name" type="text" id="name">
18、改变文本框的属性(下拉列表)
<select name="s1" onChange="if(this.value==1){document.all('T1').readOnly=true}else{document.all('T1').readOnly=false}">
<option value="1">1</option>
<option value="2">2</option>
</select>
<input type="text" name="T1"/>
19、点击整页变灰的效果(可做退出效果)。
注:页面头部必须加上
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
否则效果不能实现
<a href="#" onclick='return log_out()'>安全退出</a>
<script language="JavaScript">
<!--
function log_out()
{
ht = document.getElementsByTagName("html");
ht[0].style.filter = "progid:DXImageTransform.Microsoft.BasicImage(grayscale=1)";
if (confirm('你确定要退出管理?'))
{
window.location.href="Logout.asp";
}
else
{
ht[0].style.filter = "";
return false;
}
}
-->
</script>
20、让网页框架透明
IE5.5和NN6以上的浏览器支持Frame,Iframe对象的allowTransparency方法,如果某对象的背景颜色设置为Transparency的,它将继承包含它容器的特性。我们可以通过这个特性实现透明背景的开/关。
代码如下:
a.html如下:
<HTML><HEAD><TITLE></TITLE>
<META http-equiv=Content-Type content="text/html; charset=gb2312">
</HEAD>
<BODY style="BACKGROUND-COLOR: transparent">
<H1>透明文档</H1>
<P>此IFRAME无背景颜色</P>
<P>BODY:<br><BODY STYLE="background-color:transparent"></P></BODY></HTML>
iframe
<IFRAME ID="frame1" SRC="a.html" allowTransparency="true" HEIGHT=180 WIDTH=300> </IFRAME>
21、底部对齐的代码:
<style type="text/css">
.box1 {border:1px #cccccc solid; width:500px; height:600px;position:relative;}
.box2 {border-top:1px #cccccc solid; background:#f2f6fb; width:498px; height:22px; position:absolute; bottom:0;}
</style>
<div class="box1">
<div class="box2"></div>
</div>
22、点击提示“确定”与“取消”提示框
onclick='{if(confirm("您确定删除吗?此操作将不能恢复!")){return true;}return false;}'
23、删除.LDB文件
<%
Application.Contents.Removeall()
%>
24、将HTML格式转换为纯文本格式
<%
Function RemoveHTML(strHTML)
Dim objRegExp, Match, Matches
Set objRegExp = New Regexp
objRegExp.IgnoreCase = True
objRegExp.Global = True
'取闭合的<>
objRegExp.Pattern = "<.+?>"
'进行匹配
Set Matches = objRegExp.Execute(strHTML)
' 遍历匹配集合,并替换掉匹配的项目
For Each Match in Matches
strHtml=Replace(strHTML,Match.Value,"")
Next
RemoveHTML=strHTML
Set objRegExp = Nothing
End Function
%>
调用
<%=RemoveHTML(你的字段)%>
25、当前页地址
<%
response.write "http://"&Request.ServerVariables("server_name")&Request.ServerVariables("script_name")
%>