日期:2014-05-16 浏览次数:20381 次
<html class="">
<head>
<meta charset="UTF-8">
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.1/jquery.min.js" type="text/javascript"></script>
<script>
function setCustomTax(obj)
{
var curRow=$(obj).closest("tr");//获取当前按钮所在行
var title =$("td[id^='com_title']",curRow).text();
var price = $("td[id^='com_price']",curRow).text();
var buynum =$("td[id^='com_buynum']",curRow).text();
var URL = "mytest.php?title="+title+"&price="+price+"&buynum="+buynum;
alert(URL);
}</script>
</head>
<body>
<table width="842" border="1" cellpadding="0" cellspacing="0">
<tr>
<td id="com_title{dede:field.title/}" height="25" align="center" bgcolor="#FFFFFF">{dede:field.title/}</td>
<td id="com_price{dede:field.price/}" height="25" align="center" bgcolor="#FFFFFF">{dede:field.price/}</td>
<td id="com_buynum{dede:field.buynum/}" height="25" align="center" bgcolor="#FFFFFF">{dede:field.buynum/}</td>
<td height="25" align="center" bgcolor="#FFFFFF"><input id="customTax{dede:field.title/}" type="button" name="customtax" value="设置" style="width:90px" onClick="javascript:setCustomTax(this);" class='inputTax'></td>
</tr>
</table>
</body>
</html>