JS controls the vertical alignment of table cells

From , 5 Years ago, written in JavaScript, viewed 115 times.
URL https://pastebin.vip/view/d465f14a
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <script>
  5. function valignCell()
  6. {
  7. var x=document.getElementById('myTable').rows[0].cells;
  8. x[0].vAlign="bottom";
  9. }
  10. </script>
  11. </head>
  12.  
  13. <body>
  14. <table id="myTable" border="1" height="70%">
  15. <tr>
  16. <td>First cell</td>
  17. <td>Second cell</td>
  18. </tr>
  19. <tr>
  20. <td>Third cell</td>
  21. <td>Fourth cell</td>
  22. </tr>
  23. </table>
  24. <form>
  25. <input type="button" onclick="valignCell()" value="Vertical align cell content">
  26. </form>
  27. </body>
  28.  
  29. </html>
  30.  
  31. //javascript/7994

Reply to "JS controls the vertical alignment of table cells"

Here you can reply to the paste above

captcha

https://burned.cc - Burn After Reading Website