随笔分类 -  ASP

摘要:declare @idoc intdeclare @doc varchar(1000)--sample xml documentset @doc ='<root> <customer cid= "c1" name="janine" city="issaquah"> <order oid="o1" d 阅读全文
posted @ 2018-06-08 17:19 黑旗君
摘要:<script language="javascript">function checkall(form) { for (var i=0;i<form.elements.length;i++) { var e = form.elements[i]; if (e.name != "chkall"&&e 阅读全文
posted @ 2018-06-08 17:19 黑旗君
摘要:******* 导出到excel exec master..xp_cmdshell 'bcp settledb.dbo.shanghu out c:\temp1.xls -c -q -s"gnetdata/gnetdata" -u"sa" -p""'/*********** 导入excel sele 阅读全文
posted @ 2018-06-08 17:18 黑旗君
摘要:set xlapp = server.createobject("excel .application")strsource=filepath & "test.xls"'打开一个已经存在的test.xls文件,filepath为物理绝对路径xlapp.workbooks.open(strsource 阅读全文
posted @ 2018-06-08 17:17 黑旗君
摘要:文件aspprint.asp代码如下: <%@ language=vbscript %> <% option explicit dim strsubmit 'form中用来保存提交按钮的值 dim strprinterpath 'form中保存网络打印机路径的值 dim strusername 'f 阅读全文
posted @ 2018-06-08 17:16 黑旗君
摘要:目录 一、 环境配置 二、 asp对excel 的基本操作 三、 asp操作excel 生成数据表 四、 asp操作excel 生成chart图 五、 服务器端excel 文件浏览、下载、删除方案 六、 附录正文 一、 环境配置 服务器端的环境配置从参考资料上看,微软系列的配置应该都行,即: 1.w 阅读全文
posted @ 2018-06-08 17:14 黑旗君
摘要:1.获得系统时间:<%=now()%>2.取得来访用的ip:<%=request.servervariables("remote_host")%>3.获得系统,浏览器版本:<script>window.document.write("版本:"+navigator.appname+navigator. 阅读全文
posted @ 2018-06-08 17:13 黑旗君
摘要:一、asp的对象存取其他数据库 方法 在asp中,用来存取其他数据库 的对象统称ado(active data objects),主要含有三种对象: connection、recordset 、command connection:负责打开或连接数据 recordset:负责存取数据表 comman 阅读全文
posted @ 2018-06-08 17:12 黑旗君
摘要:<script language=javascript>var srcc = window.location; srcc = srcc.tostring()start = srcc.indexof("?"); end = srcc.length;</script> <script>alert(loc 阅读全文
posted @ 2018-06-08 17:09 黑旗君
摘要:<%yue=month(date())nian=year(date())thismon=nian&"-"&yue&"-1"nextmon=dateadd("m",1,thismon)tiancount=datediff("d",thismon,nextmon) '本月的天数 wek= weekday 阅读全文
posted @ 2018-06-08 14:56 黑旗君
摘要:1.如何用asp判断你的网站的虚拟物理路径 答:使用mappath方法 < p align="center" >< font size="4" face="arial" >< b > the physical path to this virtual website is: < /b >< /fon 阅读全文
posted @ 2018-06-08 14:55 黑旗君
摘要:oncontextmenu="window.event.returnvalue=false" 将彻底屏蔽鼠标右键<table border oncontextmenu=return(false)><td>no</table> 可用于table 2. <body onselectstart="retu 阅读全文
posted @ 2018-06-08 14:52 黑旗君
摘要:<% set rss=server.createobject("adodb.recordset") ssql="select * from [dormitory] left join [allot] on allot.r_id=dormitory.r_id and dormitory.build=a 阅读全文
posted @ 2018-06-08 12:00 黑旗君
摘要:<% squery=lcase(Request.ServerVariables("QUERY_STRING")) sURL=lcase(Request.ServerVariables("HTTP_HOST")) SQL_injdata =":|;|>|<|--|sp_|xp_|\|dir|cmd|^ 阅读全文
posted @ 2018-06-08 11:59 黑旗君
摘要:<% Dim Fy_Post,Fy_Get,Fy_cook,Fy_In,Fy_Inf,Fy_Xh,Fy_db,Fy_dbstr,aa On Error Resume Next Fy_In = "'|exec|insert|select|delete|update|count|chr|truncate 阅读全文
posted @ 2018-06-08 11:58 黑旗君
摘要:<%'定义一个nextrs函数来找出下一篇的IDfunction nrsnrs=server.CreateObject("adodb.recordset")sql="select * from articles where id>"&a1&" order by id"set nrs=conn.exe 阅读全文
posted @ 2018-06-08 11:55 黑旗君
摘要:<%set rs=server.CreateObject("adodb.recordset")sql="select * from [student_admin] order by id DESC"rs.open sql,conn,1,3%><%rs.pagesize=15'这个是显示最新的8条记录 阅读全文
posted @ 2018-06-08 11:41 黑旗君
摘要:<%set rs=server.createobject("adodb.recordset")sql="select * from [img] order by id DESC"rs.open sql,conn,1,3%><%rs.pagesize=10pagecount=rs.pagecountp 阅读全文
posted @ 2018-06-08 11:34 黑旗君
摘要:<% if session("mm_username")="" Then Response.Write "<script>window.confirm('登陆超时!');parent.window.history.go(-1);location='login.asp'</script>" end i 阅读全文
posted @ 2018-06-08 11:32 黑旗君
摘要:<% Session("mm_username")="" Response.Cookies("mm_username")="" response.write"<script>alert('成功退出系统!');location='index.asp'</script>" %> 阅读全文
posted @ 2018-06-08 11:29 黑旗君