javascript jquery 操作table记录

来源:互联网 发布:搜题的软件 编辑:程序博客网 时间:2024/06/18 00:37

 <script type="text/javascript">
//alert($('.ms-listviewtable tbody tr td').html());
$('.ms-listviewtable tbody tr td').each(function() {
 //debugger;
    var href = $(this).find('a');  
    if(href.context.innerText =='复制')
    {
     var hrefValue=href.attr('href');
     href.attr('href','javascript:SetCopyClick("'+hrefValue+'")');
     //alert(href.attr('href'));
    }    
 });
 function SetCopyClick(hrefValue)
 {
  window.open(hrefValue);
 }
</script>

 

---------------------------------

关闭窗口无提示方法。

<html>
<head>
<title>New Page 1</title>
</head>
<body>
<script language="JavaScript">
<!--
function CloseWindow()
{
window.opener=null;
window.open('','_self');
window.close();
}
//-->
</script>
<input type=button value=关闭 onclick="CloseWindow()">
</body>
</html>