1
我期待使用CSS的替代值#bigbox和#bigbox窗口只有在下拉菜單不等於排名或選擇一個位置...覆蓋CSS與下拉
這是我的第一篇文章,原諒任何格式錯誤!謝謝!
<html>
<style>
#bigbox { height:680px; }
#bigbox-window { height:680px; }
</style>
<script language="javascript" type="text/javascript">
function setIframeSource() {
var theSelect = document.getElementById('location');
var theIframe = document.getElementById('myIframe');
var theUrl;
theUrl = theSelect.options[theSelect.selectedIndex].value;
theIframe.src = theUrl;
}
</script>
<body>
<div class="page page-pick_em">
<h1>College Hockey Pick 'Em League</h1>
<form id="form1" method="post">
<label>
<select id="location" onchange="setIframeSource()">
<option value="">Select a location ...</option>
<option value="page/pick_em/standings.html">Standings</option>
<option value="page/pick_em/week01.html">Week 01</option>
<option value="page/pick_em/week02.html">Week 02</option>
</select>
</label>
</form>
<iframe SRC="page/pick_em/standings.html" width="100%" height="80%" id="myIframe" marginheight="0" frameborder="0" onLoad="autoResize('myIframe');"></iframe>
</div>
</body>
<html>
只是爲了自己的將來參考,Java是不一樣的JavaScript。 – BenM
「原諒任何格式錯誤」 - 或者,您可以使用這麼有幫助的預覽來重新檢查格式,然後點擊編輯幫助來修復它。 – millimoose
另外:你有什麼嘗試?重寫類應該應用於什麼?爲什麼在您的代碼示例中包含'setIFrameSource()'時,它似乎與您的問題沒有任何關係? – millimoose