我们常用的在a标签中有点击事件:1. a href="javascript:js_method();"这是我们平台上常用的方法,但是这种方法在传递this等参数的时候很容易出问题,而且javascript:协议作为a的href属性的时候不仅会导致不必要的触发window.onbeforeunload...
分类:
Web程序 时间:
2014-08-08 17:25:36
阅读次数:
174
请教编写testGet()函数获取这个超链接href属性,限制如下不能用
document.getElementById();
document.getElementsByName();
document.getElementsByTagName();
就是要获得哪个被点击的标签自身的对象
test
function testGet(e){
var e = wind...
分类:
编程语言 时间:
2014-08-08 16:14:28
阅读次数:
229
1 #!/usr/bin/python 2 3 read = file('thread-1554-1-1.html','r') 4 wr = file('list','w') 5 6 while 1: 7 line=read.readline() 8 if 'href' in ...
分类:
编程语言 时间:
2014-08-08 12:27:06
阅读次数:
629
<!DOCTYPE?html>
<html>
<head>
???<title>Bootstrap?实例?-?默认的导航栏</title>
???<link?href="/bootstrap/css/bootstrap.min.css"?rel="stylesheet">
???<script?src="/scripts/jquery.min....
分类:
其他好文 时间:
2014-08-07 19:29:30
阅读次数:
244
返回上一页并且刷新: location.href=document.referrer; document对象的referrer属性,返回导航到当前网页的超链接所在网页的URL。
分类:
编程语言 时间:
2014-08-07 19:29:00
阅读次数:
238
abc.cssCSS code.class1 { width:10px; background-color: red; }HTML code New Document aaa(2) New Document aaa还可以用 document.styleSheets(i).href 可以知道当...
分类:
编程语言 时间:
2014-08-07 18:39:50
阅读次数:
334
在Javascript中void是一个操作符,该操作符指定要计算一个表达式但是不返回值。void 操作符用法格式如下:1. javascript:void (expression)2. javascript:void expressionexpression 是一个要计算的 Javascript 标...
分类:
其他好文 时间:
2014-08-07 12:48:29
阅读次数:
243
基于ruby的watir自动化测试 笔记一的补充版,新增加了些特殊的控件捕获方法。还在更新中....attribute_value获取当前控件的属性Value = ie.link(:id=>'xxx’).attribute_value("href")rand_select随机选择select lis...
分类:
其他好文 时间:
2014-08-06 14:34:31
阅读次数:
324
下面是JS代码:var curr = null; //curr为当前tab的标题,在else中赋值function addtab(href, tabtitle) { if (curr) { $('#cont...
分类:
其他好文 时间:
2014-08-05 18:13:49
阅读次数:
231
/*** * 获得根目录 * @returns */function getRootPath() { var strFullPath = window.document.location.href; var strPath = window.document.location.pathn...
分类:
Web程序 时间:
2014-08-04 21:17:07
阅读次数:
262