【发布时间】:2013-04-25 08:47:01
【问题描述】:
我使用下面的 JavaScript 代码替换 div 的内容,但它不起作用。
<h:head>
<script type="text/javascript">
function Findchange() {
document.getElementById("myDiv").innerHTML='ravi';
}
</script>
</h:head>
<h:body>
<h:form id="form" onsubmit="Findchange();">
<div id="myDiv">hello</div>
<h:commandButton value="submit" ></h:commandButton>
</h:form>
</h:body>
【问题讨论】:
标签: javascript jsf-2