编辑下面的代码:【加编码】
<html> <head> <script> function alignImg() { document.getElementById("compman").align="right"; } </script> </head> <body> <img id="compman" src="/demo/compman.gif" alt="Computerman" width="107" height="98"> <p>Some text. Some text. Some text. Some text.</p> <input type="button" onclick="alignImg()" value="Align Image"> </body> </html>
结果: 【此窗口】 帮助?
Try it Yourself - © 自强学堂