获取js后所带的参数,如:a.js?a=value1&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('&');		  
		for (var i=0;i<a...


17年前9月11日 阅读:966 评论: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


17年前9月10日 阅读:1241 评论: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...


17年前9月8日 阅读:137 评论: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...


17年前9月7日 阅读:253 评论:0

非常好用的Js的querystring类


/**  
	Powered By CMSDream Copyright © 2007-2008 All rights reserved.  
	15:10 2008-6-7  
**/  
function querystring(paramstring){   
	this.url=window.location.href;   
	this.params = new Object();   
	this.initialize = function(){   
		if(paramstring.length == 0) return;   
		if(paramstring.substring(0,1)=='?'){   
			paramstring=paramstring.substring(1);   
		}   
		paramstring = p...


17年前6月7日 阅读:193 评论:0

念柳红


昔日挥泪别西安,今时含笑登鼓山;
远眺榕城繁华处,灯火夕阳映西湖;
适逢冬逝春伊始,缘逢佳人知何时?
天若有情天亦老,苍天笑我轻狂少;
吾幸缘来遇伊人,但求梦境皆亦真;
问君何故将诗颂,心烦意乱念柳红。

法语版(我让别人翻译的):

Jadis,je parties Xi’an en pleurer, et maintenant escalade la montagne de Gushan en rire;

Regardez les rues animées de Rongcheng au loin, les lampes et le soleil couchant éclairent le Xihu;

Au moment de l’hiver partit et le printemps commença, quand je peux rencontre ma maîtresse?

Si le Dieu a ...


17年前3月26日 阅读:143 评论:0

怀念毛泽东


永远怀念哪个躺在病榻上已重病缠身,惊闻唐山大地震后不禁号淘大哭的人民领袖----毛泽东!
永远怀念那个用算盘和铅笔让火箭上天(这也是迄今为止中国唯一的核心技术)手擎利剑、傲视苍穹的强国强军引路人——毛泽东!
永远怀念那个用二十七年路程硬是走完英国100年工业革命路程的中国现代工业体系奠基者-----毛泽东!
永远怀念那个当年仅用六个月时间就横扫中华古国”嫖赌吸”千年恶习,改旧人为新人的民族形象重铸者---毛泽东!
永远怀念那个运用三个世界理论,把中国推向世界,让世界认同中国的杰出外交家——毛泽东!
永远怀念那个最早提出用一国两制构思收回港澳地区的民族英雄-----毛泽东!
永远怀念那个为保红色江山永固,不惜自已身后遭抵毁而发动文革运动,举行一场全民防修演习的涅磬风凰-----毛泽东!
永远怀念那个为穷人能过上好日子,舍一家七位亲人性命、将爱子送到敌人枪口下的丈夫、父亲——毛泽东!
永远怀念那个写得一手好书...


17年前1月24日 阅读:153 评论:0

Happy Birthday!


Today is my birthday,it is also the birthday for the Party and the memorial of Hong Kong regressive to my motherland and so on.First,I hope my motherland will be powerful increasingly,Hong Kong will be prosperity increasingly.I feel pride and happiness for this day is also my birthday!

Then happy birthday to me!

When the time was about 0 o'clock,I got a message from my baby Miss Tang,this is the fir...


18年前7月1日 阅读:115 评论:1

Happy Birthday


Today is my birthday,it is also the birthday for the Party and the memorial of Hong Kong regressive to my motherland and so on.First,I hope my motherland will be powerful increasingly,Hong Kong will be prosperity increasingly.I feel pride and happiness for this day is also my birthday!

Then happy birthday to me!

When the time was about 0 o'clock,I got a message from my baby Miss Tang,this is the ...

18年前7月1日 阅读:176 评论:0

今生来世


佛告诉我们:轮回……
神告诉我们:宿命……
而智者告诉我们:整个宇宙,包括诸神,都仅仅是幻象而已。


18年前6月26日 阅读:155 评论:0

顶部