asp.netʵÏÖÊ¡ÊÐÇø¼¶ÁªÏÂÀÁÐ±í²¢±£´æ״̬
asp.netʵÏÖÊ¡ÊÐÁª¶¯²¢ÇÒ±£´æ״̬£¬ÊµÏÖÔÀí£º³õ´ÎʹÓÃC#´«Í³µÄDataBind½øÐÐÊý¾Ý°ó¶¨£¬Ñ¡ÔñÊ¡£¬Êкó½øÐÐajax·½Ê½¼ÓÔØϼ¶ÁÐ±í£¬²¢½«Ñ¡¶¨Öµ±£´æµ½HiddenÖУ¬µã»÷Ìá½»ºó¸ù¾ÝHiddenµÄÖµ½øÐÐÊ¡£¬Êа󶨣¬ÔÙ½«HiddenµÄÖµ¸³¸øDropDownListµÄSelectedValue£¬´Ó¶øʵÏÖ״̬µÄ±£´æ¡£
HTML´úÂë
<asp:HiddenField ID="HiddenFieldShiAreaId" runat="server" />
<asp:HiddenField ID="HiddenFieldQuAreaId" runat="server" />
<asp:HiddenField ID="HiddenAreaId" runat="server" />
<span class="searchDivP">ѧÉúÊ¡ÊУº</span>
<asp:DropDownList ID="DropDownListSheng" runat="server">
</asp:DropDownList>
<asp:DropDownList ID="DropDownListShi" runat="server">
</asp:DropDownList>
<asp:DropDownList ID="DropDownListQu" runat="server">
</asp:DropDownList>
javascript´úÂ루´Ë´¦Ê¹ÓÃjQuery£©
$(document).ready(function() {
$("#DropDownListSheng").change(function() {
var buxianstr = "<option selected=\"selected\" value=\"0\">²»ÏÞ</option>";
loadArea("DropDownListShi", this.value);
});
$("#DropDownListShi").change(function() {
var areaid = this.value;
loadArea("DropDownListQu", this.value);
$("#HiddenFieldShiAreaId").val(areaid);
});
$("#DropDownListQu").change(function() {
$("#HiddenFieldQuAreaId").val(this.value);
});
});
function loadArea(objid, areaid) {
$.ajax({
type: "POST",
url: "../Friend/Friend.aspx?action=getshi",
dataType: "json",
data: "areaid=" + areaid,
success: function(msg) {
var shiHtml = "";
var selectstr = "";
shiHtml += "<op
Ïà¹ØÎĵµ£º
µÚÒ»²½:
ÏÂÔØJmail×é¼þ
¹Ù·½ÍøÕ¾ http://www.dimac.net/
°²×°
µÚ¶þ²½:
½«ÆäÍÏÈëASPÏîÄ¿binĿ¼ÖÐ
Ìí¼ÓCOMÒýÓÃ
µÚÈý² ......
1. ´ò¿ªÐµĴ°¿Ú²¢´«ËͲÎÊý£º
¡¡¡¡´«ËͲÎÊý£º
response.write("£¼script£¾window.open(’*.aspx?id="+this.DropDownList1.SelectIndex+"&id1="+...+"’)£¼/script£¾")
¡¡¡¡½ÓÊÕ²ÎÊý£º
string a = Request.QueryString("id");
string b = Request.QueryString( ......
template.htmÄ£°åÒ³Ô´Âë:
1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2. <html xmlns="http://www.w3.org/1999/xhtml" >
3. <head>
4. <title ......
Ò»¡¢Ä¿Ç°ÔÚASP.NETÖÐÒ³Ãæ´«Öµ¹²ÓÐÕâô¼¸ÖÖ·½Ê½£º
1¡¢±íµ¥Ìá½»£¬
<form action= "target.aspx" method = "post" name = "form1">
<input name = "param1" value = "1111"/>
<input name = "param2" value = "2222"/>
</form>
....
&nbs ......
ÍøÂç´òÓ¡¸ÅÊö
¡¡¡¡• B/S½á¹¹µ¼ÖÂÁËWebÓ¦ÓóÌÐòÖдòÓ¡µÄÌØÊâÐÔ¡£
¡¡¡¡• ³ÌÐòÔËÐÐÔÚä¯ÀÀÆ÷ÖУ¬´òÓ¡»úÔÚ±¾µØ£¬¶øÎļþÈ·¿ÉÄÜÔÚ·þÎñÆ÷ÉÏ£¬µ¼ÖÂÁË´òÓ¡¿ØÖƲ»ÊǺÜÁé»î¡£
¡¡¡¡• ¸ñʽÈçºÎ¿ØÖƺͶ¨ÖƵȣ¬ÊÇÎÒÃÇ¿ª·¢ÖпÉÄÜ»áÃæ¶ÔµÄÎÊÌâ¡£
¡¡¡¡´òÓ¡ÎĵµµÄÉú³É
¡¡¡¡• 1¡¢¿Í»§¶Ë½Å±¾·½Ê½
¡¡¡¡Ò»°ãÇé¿öÏ£¬Ö÷ÒªÊ ......