【发布时间】:2010-12-23 03:39:27
【问题描述】:
我有一堆包含文本数据的静态 HTML 文件:
/a.html
/b.html
/c.html
在我的主页上还有一个选择/下拉框 (#loadExternal)。
使用 jQuery,我如何使用 select/dropdown 的 onChange 事件来触发将适当的外部页面加载到我的 container DIV 中?
<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>
【问题讨论】:
标签: jquery