Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Strict//EN”
- “http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd”>
- <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
- <head>
- <meta http-equiv="content-type" content="text/html; charset=utf-8" />
- <meta http-equiv="content-language" content="en-us" />
- <title></title>
- <script type="text/javascript" src="jquery.js">
- </script>
- <script type="text/javascript" src="Example.js"></script>
- <link rel="stylesheet" href="Example.css" type="text/css" />
- </head>
- <body>
- <table>
- <thead>
- <tr>
- <th>
- Head1
- </th>
- <th>
- Head2
- </th>
- </tr>
- </thead>
- <tbody>
- <tr>
- <td>
- r1c1
- </td>
- <td>
- r1c2
- </td>
- </tr>
- <tr>
- <td>
- r2c1
- </td>
- <td>
- r2c2
- </td>
- </tr>
- </tbody>
- </table>
- </body>
- </html>
- if ($) {
- $(document).ready (
- function(){
- $('table tbody').before('<tr>'+ /*can use prepend instead of before*/
- '<td>'+
- 'r0c1'+
- '</td>'+
- '<td>'+
- 'r0c2'+
- '</td>'+
- '</tr>');
- $('table tbody').after('<tr>'+ /*can use append instead of after*/
- '<td>'+
- 'r3c1'+
- '</td>'+
- '<td>'+
- 'r3c2'+
- '</td>'+
- '</tr>');
- }
- );
- }
- body {
- font: 16px sans-serif;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement