87,910
社区成员
发帖
与我相关
我的任务
分享
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title> new document </title>
<meta name="generator" content="editplus" />
<meta name="author" content="Gao YiXiang" />
<meta name="email" content="yixianggao@126.com" />
<meta name="keywords" content="javascript dhtml dom" />
<meta name="description" content="I love web development." />
</head>
<body>
随便写点儿啥!<br />
<a href="javascript:ContentSize(12)">小</a>
<a href="javascript:ContentSize(16)">中</a>
<a href="javascript:ContentSize(20)">大</a>
<script type="text/javascript">
<!--
function ContentSize(size)
{
var obj = document.body;
obj.style.fontSize = size + "px";
}
//-->
</script>
</body>
</html>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title> new document </title>
<meta name="generator" content="editplus" />
<meta name="author" content="Gao YiXiang" />
<meta name="email" content="yixianggao@126.com" />
<meta name="keywords" content="javascript dhtml dom" />
<meta name="description" content="I love web development." />
</head>
<body>
随便写点儿啥!<br />
<input type="button" onclick="ContentSize(this.value)" value="12" />
<input type="button" onclick="ContentSize(this.value)" value="16" />
<input type="button" onclick="ContentSize(this.value)" value="20" />
<script type="text/javascript">
<!--
function ContentSize(size)
{
var obj = document.body;
obj.style.fontSize = size + "px";
}
//-->
</script>
</body>
</html>