易截截图软件、单文件、免安装、纯绿色、仅160KB

ajax+asp.net/asp/php+mssql无刷新聊天室

ajax+asp.net+mssql实现的ajax无刷新聊天室,支持html web编辑器。
为了加快速度,使用了存储过程。
asp及php版本请看下面的文章
ajax+asp+mssql无刷新聊天室
ajax+php+mssql无刷新聊天室
此例子也可以作为mssql存储过程使用的示例,如php调用mssql的存储过程,php获取mssql数据库的输出参数。
要使用不同的动态页面,只需要更改lib.js文件中RequstUrl变量的值即可。
完整示例下载
效果如下
var Showbo={author:'showbo',homepage:'http://www.code-design.cn'};
Showbo.IsIE=!!document.all;
Showbo.IsFireFox=navigator.userAgent.indexOf("Firefox")!=-1;
Showbo.trim=function(v,reg){if(reg)return v.replace(reg,'');else return v.replace(/^\s*|\s*$/,'');}
Showbo.getJson=function(v){return eval('('+v+')');}
//获取某个对象的绝对位置
Showbo.getAbsPos=function(o,addXY){o=Showbo.$(o);var p=new Object();p.x=o.offsetLeft;p.y=o.offsetTop;while(o=o.offsetParent){p.x+=o.offsetLeft;p.y+=o.offsetTop;}if(addXY){if(!isNaN(addXY.x))p.x+=addXY.x;if(!isNaN(addXY.y))p.y+=addXY.y;}return p;}
Showbo.$=function(Id,isFrame){
var o;
if("string"==typeof(Id))o= document.getElementById(Id);
else if("object"==typeof(Id))o= Id;
else return null;
return isFrame?(Showbo.IsIE?document.frames[Id]:o.contentWindow):o;
}
Showbo.$s=function(){
var o,tag;
if(arguments.length==1){
o=document;tag=arguments[0];
}
else{
o=arguments[0];tag=arguments[1];
}
return o.getElementsByTagName(tag);
}
//扩展IE下的XMLHttpRequest
if(Showbo.IsIE&&!window.XMLHttpRequest)
window.XMLHttpRequest=function(){
var acX=['msxml2.xmlhttp.5.0','msxml2.xmlhttp.4.0','msxml2.xmlhttp.3.0','msxml2.xmlhttp','microsoft.xmlhttp'],Xhr;
for(var i=0;i<acX.length;i++)try{Xhr=new ActiveXObject(acX[i]);return Xhr;}catch(e){}return false;
}
Showbo.Ajax={
pools:[]//注意pools存储的对象为{xhr:ajax对象,status:ajax的状态},其中ajax的状态为1/0,1表示在使用中,0表示readyState==4了并且执行了回调函数
,getObject:function(){
for(var i=0;i<this.pools.length;i++)if(this.pools[i].status===


相关文档:

asp和fso实现新建文件夹

'-------------------------------------------------------------------------------------------------------1.asp
<!--#include file="function.asp" -->
<%if Request.Cookies("venshop")("user_name")<>"" then%>
<script>
   function checkAll(){
   for (i=0;i&l ......

[ASP中使用三层架构] 2.目录

1          前言
2          简述三层架构
3          建立站点的大体结构
3.1       代码目录
3.2       首 ......

ASP中如何用JS从子窗口传递值变量到父窗口表单中?


ASP中如何用JS从子窗口传递值变量到父窗口表单中?
 悬赏分:15 - 解决时间:2008-6-10 00:06
父窗口中有一表单,现在是点表单后的上传打开子窗口,经过无组件上传文件成功后子窗口提示成功,并用response.write(FileName) 输出路径成功.但如何传递到父窗口文本域内提交数据库呢?查资料是用JS回传写成: resp ......

ASP中动态使用MicrosoftReport详解

1.在解决方案中添加新项目数据集-mydbDataSet.xsd,在数据集里添加所要用到的表或根据需要制作新表。
2.在设计页面中拉入一个MicrosoftReportViewer,设计新报表,按照报表向导根据自己的需要选择报表的数据源和数据项,完成新报表report1.rdlc的制作。在源码中如下(“考核成绩”为数据集中的一个表)
<rsw ......

ASP取不重复的随机数

dim arr(36),xx,tt,tmp
for xx=1 to 36
arr(xx-1)=xx
next

for xx=1 to 5
Randomize
tt=clng((ubound(arr)-xx)*rnd())
response.write(arr(tt) & "<br>")

tmp=arr(tt)
arr(tt)=arr(ubound(arr)-xx)
arr(ubou ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号