设置或获取对象指定的文件名或路径。alert(window.location.pathname)设置或获取整个 URL 为字符串。alert(window.location.href);设置或获取与 URL 关联的端口号码。alert(window.location.port)设置或获取 URL 的...
分类:
Web程序 时间:
2015-06-23 11:28:31
阅读次数:
125
起初没听说过内链外链,只有链接锚文本,在面试中被问到如何查找到页面中的内链和外链,就在想,什么是内链和外链啊???????后来面试官给我解释了一下他们的区别,自己稍微懂了,自己当时回答的是通过获取a标签的href属性,查找字符串中是否存在href,后来又被问到如果用选择器怎么用呢?自己不会....后...
分类:
Web程序 时间:
2015-06-21 11:50:48
阅读次数:
137
方法一:function getSessionId(){ var c_name = "jsessionid"; // alert("cookie:"+document.cookie + " " + window.location.href ); var hrefStr ...
分类:
其他好文 时间:
2015-06-19 18:40:58
阅读次数:
136
window.open("index.aspx",'top');只是表示打开这个页面,并不是打开并刷新index.aspxwindow.location.href="index.aspx"; 表示重新定向到新页面,同时刷新打开的这个页面;eg:进行中项目进行中项目这两个的效果不同
分类:
编程语言 时间:
2015-06-19 18:33:53
阅读次数:
169
第一种 给a标签添加点击事件:
源码:
//点击百度一下 进行百度搜索
$("#baiduBtn").click(function(){
this.href="http://www.baidu.com/s?wd="+$("#baiduTxt").val();
this.target= "_blank";
this.o...
分类:
Web程序 时间:
2015-06-19 16:49:50
阅读次数:
120
今天早上我发现一个问题,当一个网页的地址最后面是一个#时(比如:http://www.baidu.com/go.asp#),执行:window.location.replace(window.location.href); 浏览器不刷新页面。经过测试: window.location.href = ...
分类:
编程语言 时间:
2015-06-17 14:59:46
阅读次数:
166
//返回参数字符串function remove_arg_from_url(arg_name_removed) { //设置或获取 href 属性中跟在问号后面的部分。 var url = window.location.search; var arr = []; var q...
分类:
Web程序 时间:
2015-06-16 12:47:10
阅读次数:
1008
window.open(basePath+"/web/homeIndex?code="+code);1.超链接Welcome等效于js代码window.location.href="http://www.xxx.net"; 2.超链接Welcome等效于js代码window.open("htt...
分类:
Web程序 时间:
2015-06-15 18:38:48
阅读次数:
112
1:准备工作
官方下载地址:http://www.uploadify.com/download/
2:引入文件
href="uploadify.css" rel="stylesheet"> src="jquery.uploadify.min.js">
3:前台页面
type="hidden...
分类:
Web程序 时间:
2015-06-13 17:12:45
阅读次数:
210
15.1屏幕抓取屏幕抓取是程序下载网页并且提取信息的过程。 简单的屏幕抓取程序fromurllibimporturlopenimportrep=re.compile(‘<h3><a.*?><a.*?href="(.*?)">(.*?)</a>‘)text=urlopen(‘http://python.org/community/jobs‘).read()forurl,nameinp.findal..
分类:
编程语言 时间:
2015-06-13 06:23:51
阅读次数:
147