我有一堆包含文本数据的静态HTML文件:
/a.html
/b.html
/c.html
Run Code Online (Sandbox Code Playgroud)
和#loadExternal我的主页上的选择/下拉框().
使用jQuery,如何使用onChangeselect/dropdown事件触发相应的外部页面加载到我的containerDIV中?
<html>
<select id="loadExternal">
<option id="a" value="a" selected="selected">Load a.html</option>
<option id="b" value="b">Load b.html</option>
<option id="c" value="c">Load c.html</option>
</select>
<div id="container">
</div>
</html>
Run Code Online (Sandbox Code Playgroud) jquery ×1