js单元格内容垂直对齐用法代码
3672Js.Com2019-03-08 13:48 来源:未知 阅读:16120 关注度5
js单元格内容垂直对齐用法代码
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>3672js教程(3672js.com)</title> <script> function topAlign(){ document.getElementById('tr2').vAlign="top"; } </script> </head> <body> <table width="50%" border="1"> <tr id="tr1"> <th>第一名字</th> <th>下一个名字</th> <th>文本</th> </tr> <tr id="tr2"> <td>Peter</td> <td>Griffin</td> <td>你好,我的名字叫Peter Griffin. 需要长文本来演示这个例子。 需要长文本来演示这个例子。</td> </tr> </table> <br> <input type="button" onclick="topAlign()" value="垂直对齐" /> </body> </html>本站文章为3672js教程网友分享投稿,版权归原作者,欢迎任何形式的转载,但请务必注明出处。同时文章内容如有侵犯了您的权益,请联系我们处理。
评论已被关闭