2012-01-19 49 views

回答

0

您可以使用簡單的DOM或使用jQuery:

$("tr").click(function() { 
    window.location = 'your_location'; 
}); 
2
<tr onclick="window.location = 'http://ubuntu.com'"> 
    <td>some text</td> 
</tr> 
0

或者直JS!

var tr = document.getElementById('tr-id'); 
tr.onclick = function (e) { 
    location.href = 'http://www.google.com'; 
};