master
editor 1 year ago
commit 6377e9ef11

@ -0,0 +1,28 @@
Ajax三级联动和无刷新分页源码
Ajax三级联动和无刷新分页源码
数据库是用的 51aspx的数据库含全国完整省市区的数据自己写的第2个 ajax例子 3联动+无刷新分页(no altas)无刷新分页 有点bug 只需要把 js/xmlhttp.js 里面的 的<table>标签 里的属性 +一个 单引号 就行了App_data下的my51aspx.mdf为Sql数据库文件附加即可
数据库操作采用的是SqlHelper
default2.aspx为无刷新分页演示
作者: wuzheworld
如需获得该源码的视频、更新等更多资料请访问: https://www.51aspx.com/Code/myAjaxDropdownlist
------------------------------------------------------------------------------------------------
源码服务专家
官网: https://www.51aspx.com
讨论圈: https://club.51aspx.com/
平台声明:
1.51Aspx平台上提供下载的资源为免费、共享、商业三类源码,其中免费和共享源码仅供个人学习和研究使用,商业源码请在相应的授权许可条件下使用;
2.51Aspx平台对提供下载的软件及其它资源不拥有任何权利,其版权归属源码合法拥有者所有;
3.著作权人发现本网站载有侵害其合法权益的内容或作品,请与我们联系( 登录官网与客服反馈或发送邮件到support@51Aspx.com
4.51Aspx平台不保证提供的下载资源的准确性、安全性和完整性;
友情提示:
一般数据库文件默认在 DB_51Aspx 文件夹下
默认账号密码一般均为51Aspx
关于源码使用常见问题及解决方案,请参阅: https://www.51aspx.com/Help

@ -0,0 +1,15 @@
using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Data.SqlClient;
/// <summary>
/// SqlDataAccess 的摘要说明
/// </summary>
public class SqlDataAccess

@ -0,0 +1,15 @@
using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Collections;
using System.Data.SqlClient;
/// <summary>
/// 数据库的通用访问代码
/// 此类为抽象类,不允许实例化,在应用时直接调用即可
/// </summary>
public abstract class SqlHelper
{

@ -0,0 +1,15 @@
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<HEAD>
<title>WebForm1</title>
<meta name="GENERATOR" Content="Microsoft Visual Studio .NET 7.1">
<meta name="CODE_LANGUAGE" Content="C#">
<meta name="vs_defaultClientScript" content="JavaScript">
<meta name="vs_targetSchema" content="http://schemas.microsoft.com/intellisense/ie5">
<script type="text/javascript" src="ajax_func.js"></script>
<script>
function changsheng(va)
{

@ -0,0 +1,15 @@
using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Data.SqlClient;
public partial class _Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{

@ -0,0 +1,15 @@
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default2.aspx.cs" Inherits="Default2" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>无标题页</title>
<link rel="stylesheet" type="text/css" href="css/a.css" />
<link href="css/div.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="js/jquery-1.2.1.pack.js"></script>
<script type="text/javascript" src="js/xmlHttp.js"></script>
<script type="text/javascript" src="js/all.js"></script>
</head>
<body>
<input type = "hidden" id = "num" name = "num" runat="server" /><!--服务器给的总数-->

@ -0,0 +1,15 @@
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
public partial class Default2 : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{

@ -0,0 +1,8 @@
// JScript 文件
function getalert()
{
var kaka=document.getElementById("Text1")
alert(kaka.value);
}

@ -0,0 +1,15 @@
//该源码下载自www.51aspx.com(1)
var http_request = false;
function send_request(method,url,content,responseType,callback){
http_request=false;
if(window.XMLHttpRequest){//Mozilla浏览器
http_request=new XMLHttpRequest();
if(http_request.overrideMimeType){
http_request.overrideMimeType("text/xml");
}
}
else{
try{
http_request=new ActiveXObject("Msxml2.XMLHTTP");
}catch(e){

@ -0,0 +1,15 @@
*{margin:0px; padding:0px;}
body{font-family:"<22><><EFBFBD><EFBFBD>"; font-size:12px; color:#333333;}
.h:link{font-family:"<22><><EFBFBD><EFBFBD>"; font-size:12px; color:#333333; text-decoration: none; line-height:20px}
.h:visited{font-family:"<22><><EFBFBD><EFBFBD>"; font-size:12px; color:#333333; text-decoration: none;line-height:20px}
.h:hover{font-family:"<22><><EFBFBD><EFBFBD>"; font-size:12px; color:#FF0C0C; text-decoration: none;line-height:20px}
.h:active{font-family:"<22><><EFBFBD><EFBFBD>"; font-size:12px; color:#FF0C0C;text-decoration: none;line-height:20px}
.hb{font-family:"<22><><EFBFBD><EFBFBD>"; font-size:14px; color:#333333; text-decoration: none; line-height:25px}
.hb:link{font-family:"<22><><EFBFBD><EFBFBD>"; font-size:14px; color:#333333; text-decoration: none; line-height:20px}
.hb:visited{font-family:"<22><><EFBFBD><EFBFBD>"; font-size:14px; color:#333333; text-decoration: none;line-height:20px}
.hb:hover{font-family:"<22><><EFBFBD><EFBFBD>"; font-size:14px; color:#FF0C0C; text-decoration: none;line-height:20px}
.hb:active{font-family:"<22><><EFBFBD><EFBFBD>"; font-size:14px; color:#FF0C0C;text-decoration: none;line-height:20px}
.z{font-family:"<22><><EFBFBD><EFBFBD>"; font-size:12px; color:#CC19D7; line-height:20px}
.z:link{font-family:"<22><><EFBFBD><EFBFBD>"; font-size:12px; color:#CC19D7; text-decoration: none; line-height:20px}
.z:visited{font-family:"<22><><EFBFBD><EFBFBD>"; font-size:12px; color:#CC19D7; text-decoration: none;line-height:20px}
.z:hover{font-family:"<22><><EFBFBD><EFBFBD>"; font-size:12px; color:#FF0C0C; text-decoration: none;line-height:20px}

@ -0,0 +1,15 @@
html,div{
font-family: "宋体";
font-size:12px;
line-height:150%;
}
#div_list
{
height: 25px;
width: 980px;
margin-right: auto;
margin-left: auto;
border-top-width: 1px;
border-bottom-width: 1px;
border-top-style: dashed;
border-bottom-style: dashed;

@ -0,0 +1,15 @@
#bg {
float: none;
height: auto;
width: 980px;
margin-right: auto;
margin-left: auto;
}
#bg #zs {
float: none;
width: 980px;
margin-top: 3px;
margin-right: auto;
margin-left: auto;
border-top-width: 1px;
border-left-width: 1px;

File diff suppressed because one or more lines are too long

@ -0,0 +1,15 @@
// JScript 文件
var request;
function createRequest() {
try {
request = new XMLHttpRequest();
} catch (trymicrosoft) {
try {
request = new ActiveXObject("Msxml2.XMLHTTP");
} catch (othermicrosoft) {
try {
request = new ActiveXObject("Microsoft.XMLHTTP");
} catch (failed) {
request = false;
}
}
Loading…
Cancel
Save