0
我可以通過iframe中顯示我的其他網頁,但我怎麼能使其不可見或者當同一按鈕被再次點擊如果再次單擊相同的按鈕或單擊其他按鈕,如何隱藏Iframe?
<html>
<script type="text/javascript">
function showIFrame() {
var iframe = document.getElementById("myiframe");
iframe.style.display="block";
}
</script>
<style>
#myiframe {
display:none; }
</style>
<body>
<iframe id="myframe" name="carsearch" width="535" height="625" scrolling="no" frameborder="0"></iframe>
<form name="search" id="search" method="get" action="../crime_map/map_crime_pending.php" target="carsearch">
<button type="submit" id="SearchCarButton" class="submitBtn" onclick="showIFrame()"/> <span>Search</span></button></form>
<button>Catcher</button>
</body>
</html>
這個http://api.jquery.com/toggle/不起作用? – zamil