我使用下面的JavaScript代码替换div
的内容,但它不起作用。无法用JSF中的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>
感谢它的工作.... – ravi 2013-04-29 11:59:12