js 效果:function $(id) { return document.getElementById(id) }
/*理事会的首页的专题下拉*/
$("h_about_lshi_sep").onclick = function(e) {
var src = e ? e.target : event.srcElement;
if (src.tagName == "H6") {
var next = src.nextElementSibling || src.nextSibling;
next.style.display = (next.style.display == "block") ? "none" : "block"; }
if (src.tagName == "H5") {
var next = src.nextElementSibling || src.nextSibling;
next.style.display = (next.style.display == "block") ? "none" : "block"; }
}ajax:
<script type="text/javascript">
$(document).ready(function() {
GetSearchList(1);
});
var request = window.location.search;
var Action = request.substring(1, request.length);
function GetSearchList(page, type) {
if (Action.indexOf('&page=') > -1)
{ Action = Action.replace(/\&page=\d+/, '&page=' + page); }
else { Action += '&page=' + page; }
$.ajax({
url: "/NList.aspx", //请求的url地址
dataType: "html", //返回格式
async: true, //请求是否异步,默认为异步,这也是ajax重要特性
data: Action, //参数值
type: "GET", //请求方式
beforeSend: function() { //请求前的处理
},
success: function(data) {
var arr = data.split('|$|');
$("#div_list").html(arr[0]);
// $("#div_list1").html(arr[1]);
//请求成功时处理
},
complete: function() { //请求完成的处理
},
error: function() {
document.getElementById("div_List").innerHTML = '加载失败';
//请求出错处理
}
});
}
</script>出错的位置就是 $(document).ready(function() {
GetSearchList(1);
}); 这里 走到这里就走不动了我听别人说好像是框架什么的不统一 不过我不会改。
还请各位大牛 帮帮忙 今天就要用 超急的。分数不成为题 尽我所能的给
/*理事会的首页的专题下拉*/
$("h_about_lshi_sep").onclick = function(e) {
var src = e ? e.target : event.srcElement;
if (src.tagName == "H6") {
var next = src.nextElementSibling || src.nextSibling;
next.style.display = (next.style.display == "block") ? "none" : "block"; }
if (src.tagName == "H5") {
var next = src.nextElementSibling || src.nextSibling;
next.style.display = (next.style.display == "block") ? "none" : "block"; }
}ajax:
<script type="text/javascript">
$(document).ready(function() {
GetSearchList(1);
});
var request = window.location.search;
var Action = request.substring(1, request.length);
function GetSearchList(page, type) {
if (Action.indexOf('&page=') > -1)
{ Action = Action.replace(/\&page=\d+/, '&page=' + page); }
else { Action += '&page=' + page; }
$.ajax({
url: "/NList.aspx", //请求的url地址
dataType: "html", //返回格式
async: true, //请求是否异步,默认为异步,这也是ajax重要特性
data: Action, //参数值
type: "GET", //请求方式
beforeSend: function() { //请求前的处理
},
success: function(data) {
var arr = data.split('|$|');
$("#div_list").html(arr[0]);
// $("#div_list1").html(arr[1]);
//请求成功时处理
},
complete: function() { //请求完成的处理
},
error: function() {
document.getElementById("div_List").innerHTML = '加载失败';
//请求出错处理
}
});
}
</script>出错的位置就是 $(document).ready(function() {
GetSearchList(1);
}); 这里 走到这里就走不动了我听别人说好像是框架什么的不统一 不过我不会改。
还请各位大牛 帮帮忙 今天就要用 超急的。分数不成为题 尽我所能的给
jQuery(function($){
$(document).ready(function() {
GetSearchList(1);
});
var request = window.location.search;
var Action = request.substring(1, request.length);
function GetSearchList(page, type) {
if (Action.indexOf('&page=') > -1)
{ Action = Action.replace(/\&page=\d+/, '&page=' + page); }
else { Action += '&page=' + page; }
$.ajax({
url: "/NList.aspx", //请求的url地址
dataType: "html", //返回格式
async: true, //请求是否异步,默认为异步,这也是ajax重要特性
data: Action, //参数值
type: "GET", //请求方式
beforeSend: function() { //请求前的处理
},
success: function(data) {
var arr = data.split('|$|');
$("#div_list").html(arr[0]);
// $("#div_list1").html(arr[1]);
//请求成功时处理
},
complete: function() { //请求完成的处理
},
error: function() {
document.getElementById("div_List").innerHTML = '加载失败';
//请求出错处理
}
});
}
})
</script>
试试
$.noConflict(); jQuery(document).ready(function($) {
GetSearchList(1);
});
var request = window.location.search;
var Action = request.substring(1, request.length);
function GetSearchList(page, type) {
if (Action.indexOf('&page=') > -1)
{ Action = Action.replace(/\&page=\d+/, '&page=' + page); }
else { Action += '&page=' + page; }
jQuery.ajax({
url: "/NList.aspx", //请求的url地址
dataType: "html", //返回格式
async: true, //请求是否异步,默认为异步,这也是ajax重要特性
data: Action, //参数值
type: "GET", //请求方式
beforeSend: function() { //请求前的处理
},
success: function(data) {
var arr = data.split('|$|');
jQuery("#div_list").html(arr[0]);
//请求成功时处理
},
complete: function() { //请求完成的处理
},
error: function() {
document.getElementById("div_List").innerHTML = '加载失败';
//请求出错处理
}
});
}
</script>好像跟calmcrime的方法差不多。但是具体原因我不太懂,对这方面太弱了
好了 给分