classjs Դ?????
你要表达的意思应该是:那个JS里边调用了id='good'这个元素吧,下载一些文本编辑器比如notepad++,码分centsos xtrans源码打开你的码分飞驴网站源码HTML文件目录,按ctrl+shift+f,码分轻松筹 源码应用全局查找document.getElementById("good")或者$("#good"),码分怎么抽出app源码正则表达式为document.getElementById(['"]?码分视频分享 php源码good['"]?)或$(['"]?#good['"]?)
js里怎么将 document.getElementById 改成调用 class 类的名称
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>
RunJS 演示代码
</title>
<script type="text/javascript">
function test(obj) {
if (obj.id == "Radio1") {
document.querySelector(".Div1").style.display = "block";
document.querySelector(".Div2").style.display = "none";
}
if (obj.id == "Radio2") {
document.querySelector(".Div1").style.display = "none";
document.querySelector(".Div2").style.display = "block";
}
}
</script>
</head>
<body>
<input type="button" id="Radio1" onclick="test(this)" value="我" />
<input id="Radio2" type="button" onclick="test(this)" value="你" />
<div class="Div1" style="display:none;">
aaaa
</div>
<div class="Div2" style="display:none;">
bbbb
</div>
</body>
</html>
2024-12-23 23:46
2024-12-23 23:42
2024-12-23 23:28
2024-12-23 22:29
2024-12-23 21:45