浏览器中不起作用,谢谢~
<body >
<script>
function fun(){
document.getElementById("div1").innerHTML.big();
document.getElementById("div2").innerHTML.fontcolor('red');
}
</script>
<input type="button" onclick="fun()" value="确定" />
<div>正常字体</div>
<div id="div1">大号字体</div>
<div id="div2">红色字体</div>
</body>
javascript中big() fontcolor("red")的用法,但是不知道哪里写错了
答案:1 悬赏:80 手机版
解决时间 2021-03-21 08:02
- 提问者网友:王者佥
- 2021-03-20 07:58
最佳答案
- 五星知识达人网友:深街酒徒
- 2021-03-20 08:21
<!DOCTYPE HTML>
<html>
<head>
<meta charset="UTF-8" />
<title>last.html</title>
<style>
</style>
<script type="text/javascript">
function fun ()
{
div1.innerHTML = div1.innerHTML.big ();
div2.innerHTML = div2.innerHTML.fontcolor ('red');
}
</script>
</head>
<body>
<input type="button" onclick="fun()" value="确定" />
<div>正常字体</div>
<div id="div1">大号字体</div>
<div id="div2">红色字体</div>
</body>
</html>
<html>
<head>
<meta charset="UTF-8" />
<title>last.html</title>
<style>
</style>
<script type="text/javascript">
function fun ()
{
div1.innerHTML = div1.innerHTML.big ();
div2.innerHTML = div2.innerHTML.fontcolor ('red');
}
</script>
</head>
<body>
<input type="button" onclick="fun()" value="确定" />
<div>正常字体</div>
<div id="div1">大号字体</div>
<div id="div2">红色字体</div>
</body>
</html>
我要举报
如以上问答信息为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
大家都在看
推荐资讯