tadle的style属性怎么定义啊,定义了就不变了吗,很想学学这个诶!

来源:百度知道 编辑:UC知道 时间:2024/05/10 10:38:20

这个东西要指定到点..像这样

<!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>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
</head>

<body>
<input name="ttt" type="text" id="ttt" />
<script language="JavaScript" type="text/javascript">
document.getElementById("ttt").style.background="#ff0000";
</script>
</body>
</html>

具体的Style可以参考
样式标签属性 样式属性 描述
bac