fmpq.com
源代码:
点击运行
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>Fmpq教程(fmpq.com)</title> <script> function displayResult(){ document.getElementById('td1').vAlign="top"; document.getElementById('td2').vAlign="top"; document.getElementById('td3').vAlign="top"; } </script> </head> <body> <table width="50%" border="1"> <tr> <th>Firstname</th> <th>Lastname</th> <th>Text</th> </tr> <tr> <td id="td1">Peter</td> <td id="td2">Griffin</td> <td id="td3">你好,我的名字叫Peter,我需要一个长文本来演示,我需要一个长文本来演示。</td> </tr> </table> <br> <button type="button" onclick="displayResult()">内容向上对齐</button> </body> </html>
运行结果