SQLServer 通用分页存储过程(使用游标)


/*
  Powered By CMSDream Copyright (c) All rights reserved.
  通用分页存储过程
*/
CREATE proc [dbo].[cmsdream_SP_MultiPage](
	@sql varchar(8000)='',
	@PageSize int=1,
	@CurrentPage int=1,
	@RecordCount int=0 output,
	@PageCount int=1 output
)AS
if @PageSize < 1 set @PageSize = 1
if @CurrentPage < 1 set @CurrentPage = 1
begin
	set nocount on

	declare @p1 int,
	@rowcount int
	exec...


15年前9月20日 阅读:283 评论:0

获取js后所带的参数,如:a.js?a=value1&amp;b=value2


将以下代码保存为:a.js

function querystring(){      
    this.params = new Object();      
    this.initialize = function(){      
		var param=this.paramstring();      
		if(param.length == 0) return;      
		if(param.substring(0,1)=='?'){      
			param=param.substring(1);      
		}      
		param = param.replace(/\+/g, ' ');      
		var args = param.split('&amp;');		  
		for (var i=0;i<a...


15年前9月11日 阅读:881 评论:0

隐藏文件名后缀的URL Rewrite


我看网上有很多此类功能,当然asp.net自身很容易实现,但是其它的要实现会出现一点小问题,本人写了一个,经过测试没有任何问题,应该也支持apache。

代码如下:

RewriteRule ^(.*)/([\w\-]+)\?(.*)$ $1/$2\.asp\?$3
RewriteRule ^(.*)/([\w\-]+)$ $1/$2.asp

说明:http://www.x.com/test.asp?a=querystring 可以直接访问 http://www.x.com/test?a=querystring

还有一个省略文件名的正则,代码如下:

RewriteRule ^(.*)/([\w]+)$ $1/index\.asp\?$2

说明:http://www.x.com/index.asp?querystring 可以直接访问 http://www.x.com/querystring


15年前9月10日 阅读:1155 评论:0

一个简单的Ajax类


/**  
	Powered By CMSDream Copyright © 2007-2008 All rights reserved.  
	14:21 2008-5-10  
**/  
function CMSDreamAjaxLib(){   
	/**//**  
	成员变量  
	*/  
	this.XMLHttpReq = null;		//XML对象   
	this.method = "post";		//执行的方法(post/get)   
	this.url = "";			//异步调用的页面地址   
	this.responseText = "";		//异步返回的响应字符串   
	this.responseXML = "";		//异步返回的响应XM...


15年前9月8日 阅读:105 评论:0

动态加载样式元素的函数(兼容IE,FireFox,Opera)


如题,目前只对IE,FireFox,Opera这三种浏览器的兼容性进行过测试,其它浏览器还未测试。

有兴趣的朋友可以研究一下,应该也没问题的。

function AttachStyle(styDom, styCss, styId){   
	var istyle = styDom.createElement('style');   
	istyle.setAttribute("type", "text/css");   
	if(styId!=null){if(!document.getElementById(styId)){istyle.setAttribute("id", styId);}}   
	if (istyle.styleSheet){   
		istyle.styleSheet.cssText=styC...


15年前9月7日 阅读:177 评论:0

顶部