javascript实现xslt转换xml
摘要:xml:<?xml version="1.0" encoding="gb2312"?><items> <item id="1">one</item> <item id="2">two</item> <item id="3">three</item></items>xsl:<?xml v...
阅读全文
js的Hashtable类(转)
摘要:function Hashtable(){ this._hash = new Object(); this.add = function(key,value){ if(typeof(key)!="undefined"){ if(this.contains(key)==false){ this._hash[key]=typeof(value)=="undefined"?null:value; ret...
阅读全文
保存javascript运行状态
摘要:利用URL中的Hash参数,也就是#开头的标签参数获取Hash参数的方法:document.location.hashe.g. http://news.ouc.edu.cn/index.htm#aaa得到结果是#aaa <html><head><script>function FunctionTagger(){ this.actions={};//存储作为状态信...
阅读全文
解决IE访问域外信息警告对话框弹出
摘要:当使用XMLHttpRequest对象向其他URL发送请求的时候,IE浏览器会弹出一个是否访问的警告对话框.该对话框视IE的安全设置而定,但开发人员不能要求每个访问者降低其IE的安全设置. 解决办法是在服务器端发送请求,得到HTTP流,然后XMLHttpRequest对象向其请求.以ASP.NET为例子,要用到WebClient类(在System.Net命名空间),假设要向该地址POST 2个参数...
阅读全文
创建XmlHttpRequest
摘要:XmlHttpRequest是AJAX的基础每个类型浏览器XmlHttpRequest对象的实现方式不一样以下函数用于创建XmlHttpRequest对象function CreateXmlHttp(){ var ARR_ACTIVEX = ["MSXML4.DOMDocument", "MSXML3.DOMDocument", "MSXML2.DOMDocument", "MSXML.DOMDo...
阅读全文