<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlsns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
<script type="text/javascript">
function changeCont()
{
var num=document.getElementById("select");
var optValue=num.value;
//alert(optValue);
var divCont=document.getElementById("div1");
divCont.style.fontSize=(optValue*10)+'px';
if(optValue==1){document.getElementById("div1").style.color='red';}
if(optValu
JS下拉菜单实现字体大小(实例)
最新推荐文章于 2020-12-01 15:09:42 发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)