App下载
实例代码( Tip: 登录后体验更佳 )
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
<!DOCTYPE html>
<html>
<head>
<script>
function alignImg()
{
document.getElementById("compman").align="right";
}
</script>
</head>
<body>
<img id="compman" src="/statics/images/w3c/eg_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>
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
运行结果