用javascript获取url网址信息执行 用javascript获取url网址信息
代码效果如下location.host=www.wanruyi.comlocation.hostname=www.wanruyi.comlocation.href=http://www.wanruyi.com/s...
分类:
编程语言 时间:
2014-06-29 13:03:49
阅读次数:
251
functionrequest(paras){varurl=location.href;varparaString=url.substring(url.indexOf("?")+1,url.length).split("&");varparaObj={}for(i=0;j=paraString[i]...
分类:
Web程序 时间:
2014-06-28 18:25:01
阅读次数:
186
例:http://XXX/mobile/NewsView.htm?action=notice&id=1action=request("action")id=request("id")
分类:
Web程序 时间:
2014-06-16 06:29:41
阅读次数:
202
以前写过一篇类似的博文(提取 url 的搜索字符串中的参数),但是个人觉得使用起来不是很方便,今天抽空重新写了个函数,该函数代码更加简洁。
分类:
编程语言 时间:
2014-06-15 13:05:49
阅读次数:
188
使用js获取当前页面的url网址信息。1、设置或获取整个 URL 为字符串:
window.location.href 2、设置或获取与 URL 关联的端口号码: window.location.port 3、设置或获取 URL
的协议部分 window.location.protocol 4、(w...
分类:
Web程序 时间:
2014-06-13 16:01:53
阅读次数:
270
1、设置或获取整个 URL 为字符串:window.location.href2、设置或获取与 URL
关联的端口号码:window.location.port3、设置或获取 URL 的协议部分window.location.protocol4、设置或获取
href 属性中跟在问号后面的部分wind...
分类:
Web程序 时间:
2014-06-13 14:31:43
阅读次数:
274
方法一:正则分析法function getQueryString(name) { var
reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i"); var r =
window.location.search.substr(1).m...
分类:
Web程序 时间:
2014-06-09 16:03:15
阅读次数:
293
(转自:http://www.cnblogs.com/JuneZhang/archive/2010/11/26/1888863.html)HttpContext.Current.Request.Url.ToString()并不可靠。如果当前URL为http://localhost/search.as...
分类:
Web程序 时间:
2014-06-06 22:30:16
阅读次数:
286
(1) 读取页面元素的onclick属性值
页面代码:
链接
程序代码:
IHTMLElement *item;// 已经找到该元素
想取出item身上onclick属性的值:alert('ok');
IHTMLElement *item;
CComQIPtr spElem(item);
VARIANT var;
spElem->get_onclick(&var);
CComQIPtr...
分类:
其他好文 时间:
2014-05-21 06:52:51
阅读次数:
225