小编Tor*_*idt的帖子

如何使用jQuery将静态HTML文件的内容加载到DIV中?

我有一堆包含文本数据的静态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

3
推荐指数
1
解决办法
2514
查看次数

标签 统计

jquery ×1