डिप्लोमा इन ऑफिस मैनेजमेंट एण्ड अकाउटिंग

डिप्लोमा इन ऑफिस मैनेजमेंट एण्ड अकाउटिंग

Full Stack Web Development with Laravel

Full Stack Web Development with Laravel

Affiliate Program

Affiliate Program

Create table row clickable as link

<!DOCTYPE html>
<html>
<head>
<title></title>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script>
</head>
<body>
<table width="50%">
<thead>
<tr>
<th>Company</th>
<th>Website</th>
</tr>
</thead>
<tbody>
<tr data-href="https://www.facebook.com">
<td>Facebook</td>
<td>www.facebook.com</td>
</tr>

<tr data-href="https://www.google.com">
<td>Google</td>
<td>www.google.com</td>
</tr>

<tr data-href="https://www.flipkart.com">
<td>Flipkart</td>
<td>www.flipkart.com</td>
</tr>
</tbody>
</table>
</body>
</html>
<script>
  $(function(){
      $('*[data-href]').on('click', function() {
           window.location = $(this).data("href");
      });
  })
</script>
© 2016 - 2023, All Rights are Reserved.