日期:2014-05-16 浏览次数:20351 次
<tr>
<td>10001</td><td>张山1</td><a href="javascript:open()">弹开</a>
<td>10002</td><td>张山2</td><a href="javascript:open('')">弹开</a>
</tr>
<javascript>
open()
{
window.open('a.php?id=?');
}
</javascript>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7/jquery.min.js" type="text/javascript"></script>
</head>
<body>
<table>
<tr>
<td>123</td>
<td>测试</td>
<td><a href="javascript:;">点击</a></td>
</tr>
</table>
<script>
var open_url = function (td1, td2) {
alert("http://www.decadework.com?TD1=" + td1 + "&TD2=" + td2);
open("http://www.decadework.com?TD1=" + td1 + "&TD2=" + td2);
}
$("a").click(function () {
var td1 = $(this).parent().prev().text();
var td2 = $(this).parent().prev().prev().text();
open_url(td1, td2);
});
</script>
</body>
</html>