var t = documentgetElementById("typeController"); alert(toptions[tselectedIndex]value);
你的代码有错误(if;document),试试这个吧。
<head>
<meta >
<html>
<script type="text/javascript">
function change(){
var color = documentgetElementById("color")value;
var div = documentgetElementById("text");
if (color)
divstylecolor = color;
}
</script>
<body>
<div id="text">今天你学JAVA了吗</div>
<input type="textfield" id="color" />
<input type="button" onclick="change();" value="确定"/>
</body>
</html>
以上就是关于微信小程序怎么把前端for循环的index值让当前页的js获取到全部的内容,包括:微信小程序怎么把前端for循环的index值让当前页的js获取到、帮忙改进一个JavaScript 小程序,希望能实现在星期几下边显示一张图片,每天的都不一样。、一个用JAVA做网页的小程序等相关内容解答,如果想了解更多相关内容,可以关注我们,你们的支持是我们更新的动力!
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)