js 页面输出值
时间:2021-07-01 10:21:17
帮助过:23人阅读
<html>
<head>
<title>b</title>
<script language = "javascript">
function A(){
document.getElementById("divId").innerText ="点了AAAAAAAAAAA";
}
function B(){
document.getElementById("divId").innerText ="点了BBBBBBBBBB";
}
</script>
</head>
<body>
现在页面没有遭到js的影响,很安静!<br>
<a href="#" onclick="javascript:A();">影响A</a>
<a href="#" onclick="javascript:B();">影响B</a>
<div id="divId"></div>
</body>
</html>
</body>
</html>