我的网站是:http ://server1.bioprotege-inc.net/permanent_Files/digichat_admin_panel/#Home
显示“主页”的链接会下拉我指定 id 喜欢做什么但无法开始工作的内容是使用下拉菜单上的选项之一来删除与主页链接相同的内容,但我无法得到它像那样工作和建议?
// JavaScript Document
$(document).ready(function(){
$("#Home").click(function(){
Load_ajax_page("Content_Files/Home.html");
});
$("#Chat").click(function(){
Load_ajax_page("Content_Files/Chat.html");
});
$("#Rules_List").click(function(){
Load_ajax_page("Content_Files/Rules_List.html");
});
$("#The_Team").click(function(){
Load_ajax_page("Content_Files/The_Team.html");
});
$("#Forums").click(function(){
Load_ajax_page("Content_Files/Forums.html");
});
});
function Load_ajax_page(url){
//this is a jquery method to make a ajax request
$.post(url,"",function (data){
//this is the place where the data is returned by the request
//remove loading and add the data
$("#response").html(data);
});
}
HTML CODE NOW FOR DROPDOWN MENU:
<form onclick="">
<select onchange="window.open(this.options[this.selectedIndex].value,'_top')" style="width:582px; height:25px;">
<option value="#">Enter Free Hosted Sites:</option>
<option value="#"></option>
<option value="#Home">Hosted1 - Shadow Hunters</option>
<option value="http://www.google.com">Hosted2</option>
<option>Hosted3</option>
<option>Hosted4</option>
</select>
</form>
<br />
<div id="response"></div>