asp判断提交的方法
If Request.ServerVariables("Request_Method") <> "post" Then
Response.End()
End If
破解百度iframe
<script language="javascript">
<!--
if (top.location !== self.location) {
top.location=self.location;
};
//-->
</script><script>var location='';</script>
insert插入数据
Sql = "INSERT INTO 表名(字段)"
Sql = Sql & " VALUES('" & 值 & "')"
Conn.Execute(Sql)
在asp中用js返回功能
返回来访页面:
Response.Write ("<script LANGUAGE=""javascript"">")
Response.Write ("alert(""修改成功!"");")
Response.Write ("history.go(-1);")
Response.Write ("</script>")
返回指定页面:
Response.Write ("<script LANGUAGE=""javascript"">")
Response.Write ("alert(""修改成功!"");")
Response.Write ("document.location.replace(""index.asp"");")
Response.Write ("</script>")
错误类型一:
Microsoft OLE DB Provider for ODBC Drivers (0x80004005)
[Microsoft][ODBC Microsoft Access Driver] 不能更新。数据库或对象为只读。
错误类型二:
Microsoft OLE DB Provider for ODBC Drivers 错误 ''80004005''
[Microsoft][ODBC Microsoft Access Driver]常见错误 不能打开注册表关键字 ''Temporary (volatile) Jet DSN for process 0x728 Thread 0x854 DBC 0x276fb44 Jet''。
当你使用ASP连接数据库时可能会出现这种情况,为什么呢?因为您数据库文件所在的目录权限对特定的用户没有开启足够的权限,你只能进行只读访问,一般出现这种情况的文件系统为NTFS,那怎么解决呢?
首先,你找到数据库所在目录,也可以是上层目录,然后设置文件夹 安全 属性,最简单的是把everyone的权限设置成完全即可,那对于这个问题,应该使哪个对象的权限设置成完全呢?答案是 IUSER_您的机器名 。这个是哪个对象?这个是Internet来宾用户,有兴趣的读者可以查阅相关资料。至此,问题解决,你可以再运行一下看看是否解决了问题。
附:对于Windows XP的用户,也许你会茫然于更改文件夹的安全属性。因为在默认情况下,Windows XP使用了简单文件共享方法,所以,当你点 属性 的时候是看不到 安全 选项卡的。具体操作如下:
我的电脑-->文件夹选项-->查看-->取消 使用简单文件共享(推荐) 的勾选 即可。你查看一下你要更改文件夹的属性,是不是多了一个 安全 选项卡呢?
数字自动转换大写
<script>
//转换大写金额
function toBigCurrency(Num){
for(i=Num.length-1;i>=0;i--)
{
Num = Num.replace(",","")//替换tomoney()中的“,”
Num = Num.replace(" ","")//替换tomoney()中的空格
...
根据另外一个表排序
其他部分不变,只看sql语句:sql="select * from 表A a INNER JOIN 表B b ON a.条件= b.条件 where 表达式 order by b.排序字段"
呵呵!终于会这个了,以后可以利用这个添加浏览量了!感谢所有TV!
overflow:hidden的理解
overflow:hidden 自动隐藏超出的字符,图片,防止撑出层和表格的范围
Ajax实现异步的程序
var xmlHttp = false;
function createxmlHttp(){
try {
xmlHttp = new ActiveXObject("Msxml2.XMLHTTP");
} catch (e) {
try {
xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
} catch (e2) {
xmlHttp = false;
}
}
if (!xmlHttp && typeof XMLHttpRequest != 'undefined') {
xmlHttp = new XMLHttpRequest();
}
}
function CityAgent(CityID){ //由城市id得到该城市对应的代理商
createxmlHttp();
ChildCode=document.getElementById("ProInfo_ChildCode").value;
var URL="newindexjs.asp?FDItemCode_Chuan="+ItemCode;
xmlHttp.onreadystatechange=CityAgent_back;
xmlHttp.open("GET",URL);
xmlHttp.send(null);
}
function CityAgent_back(){ //返回由城市id得到该城市对应的代理商
if(xmlHttp.readyState==4){
if(xmlHttp.status==200){
document.getElementById("Agentid").innerHTML=xmlHttp.responseText;
}
}
else{
document.getElementById("Agentid").innerHTML="<img src=images/loading.gif>";
}
}
265默认的css设置
*{margin:0;padding:0}
a:link,a:visited{text-decoration:none}
a:hover{text-decoration:underline}
body{margin-top:0;padding:0 10px;text-align:center;font:12px 宋体}
td,input,select,textarea{font-size:12px}
ul li{list-style:none}
img{border:none}
.hidden{display:none}
.show{display:block}
.hand{cursor:pointer}
.btn{cursor:pointer}
.l{float:left}
.r{float:right}
.clear{clear:both;font-size:1px;height:0;margin-top:-1px}
.active a:hover{text-decoration:none;cursor:text}
