<H2> Would you like to bounce an instance or application?</H2>
<form name="dropDown" method="POST">
<select name="choiceDropDown" onchange="include()">
<option value="1">Instance Level</option>
<option value="2">Application Level</option>
</select>
</form>
<div id="inst" class="outsidePages"><jsp:include page='Instance_List.htm'/></div>
<!-- END CONTAINER -->
</td>
</tr>
</table>
<!-- end content -->
</td> </tr> </table> </div> </div>
<div id="footerWrapper"> <div id="footer">Footer content goes here</div> </div>
</body>
<script type="text/javascript"> function include() { var container = document.getElementById("inst"); container.innerHTML = "";
container.innerHTML = " <jsp:include page='Home.htm'/> ";
}
</script>
</html>
內部,上面我想要做的是,如果下拉框的變化則格「出師表」應改變,這樣它包括不同頁面的腳本。問題是當我試圖做到這一點時,它打破了。如果我讓container.innerHTML = "Good morning"
或其他任何工作正常。任何想法爲什麼發生這種情況試圖動態嵌入一個HTML頁面的另一
你的代碼示例似乎已經搞亂了,所以很難說出你在做什麼。你能編輯問題並重新格式化嗎? –