redirect to url on clicking in td space

<td><a href="http://example.com">&nbsp;</a></td>

or

<td onclick="window.location='http://example.com'"></td>

Bind a Javascript method to the onclick event on the TD, if you are using jQuery you can do this:

$(document).ready(function(){

$("td").click(function(){

    // Perform your action on click here, like redirecting to a new url
    window.location='http://google.com';
});

});

either fill the td with an <a> or set it's onclick to window.location = "URL"


for same window

onclick="window.location('www.example.com')"

for new window

onclick="window.open('www.example.com')";

Tags:

Html