點選下拉框切換頁面並顯示在當前頁(語言切換)
預設html:
<div class="styled-select">
<select class="text-size20" id="status" onchange="MM_jumpMenu('parent',this)" >
<option value="index.html" selected="selected"><href>簡體中文</href></option>
<option value="en/en_index.html" >English</option>
<option value="ko/index.html" >한국어</option>
<option value="ja/index.html" >日本語</option>
</select>
</div>
en目錄下html
<div class="styled-select">
<select class="text-size20" id="status" onchange="MM_jumpMenu('parent',this)">
<option value="../index.html">簡體中文</option>
<option value="../en/en_index.html" selected="selected">English</option>
<option value="../ko/index.html">한국어</option>
<option value="../ja/index.html">日本語</option>
</select>
</div>
ko目錄下html
<div class="styled-select">
<select class="text-size20" id="status" onchange="MM_jumpMenu('parent',this)" >
<option value="../index.html">簡體中文</option>
<option value="../en/en_index.html">English</option>
<option value="../ko/index.html" selected="selected">한국어</option>
<option value="../ja/index.html">日本語</option>
</select>
</div>
ja目錄下html
<div class="styled-select">
<select class="text-size20" id="status" onchange="MM_jumpMenu('parent',this)">
<option value="../index.html">簡體中文</option>
<option value="../en/en_index.html">English</option>
<option value="../ko/index.html">한국어</option>
<option value="../ja/index.html" selected="selected">日本語</option>
</select>
</div>
js:
//頁面切換
function MM_jumpMenu(targ, selObj, restore) {
eval(targ + ".location='" +selObj.value + "'");
};