日期:2014-05-16  浏览次数:20534 次

asp.net C# 获取js 城市切换的值
请问在一个*.aspx中的后台cs代码中怎么获取js里面的城市值啊,各位帮一下吧,有合适的马上给分


前台:<%@ 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">

<script src="city.js" type="text/javascript"></script>
<script type="text/javascript" language="javascript">
var isFull = 0; 
</script>
<head runat="server">
<style type="text/css">
body,td,th,li,a {
font-size: 12px;
font-family: 宋体;
}

ul {
margin: 0px;
padding: 0px;
}

li {
list-style: none;
}

#cityList {
width: 320px;
height: 320px;
position: absolute;
left: 1px;
top: 1px;
background-color: white;
display: none;
border: 1px solid #999999;
}

#cityList .head {
background-color: #b0d3fb;
height: 25px;
}

.head .title {
width: 160px;
float: left;
text-align: left;
height: 25px;
line-height: 25px;
color: #333333;
font-weight: bold;
}

.head .exit {
width: 160px;
float: left;
text-align: right;
height: 25px;
line-height: 25px;
}

.exit a {
color: #333333;
font-weight: bold;
text-decoration: none;
}

#cityList #content {
width: 100%;
height: 295px;
overflow-x: hidden;
overflow-y: auto;
}

#content .line {
width: 100%;
height: auto;
overflow: inherit;
border-bottom: 1px dashed #e0e2e4;
padding-top: 10px;
padding-bottom: 10px;
}

.line .pro {
width: 60px;
text-align: center;
font-weight: bold;
float: left;
line-height: 22px;
}

.line .city {
width: 237px;
padding-right: 3px;
height: auto;
float: right;
letter-spacing: 1px;
line-height: 20px;
}

.city a {
font-size: 12px;
color: #0000ff;
}


</style>

    <title>无标题页</title>
</head>
<body>
    <form id="form1" runat="server">
     <table width="100%">  
    <tr>  
         <td width="100%" align="center"><a href="javascript:dsy.open()">[切换城市]</a></td>  
     </tr>  
 </table>  
 <div id="cityList">  
 <ul class="head">  
     <li class="title">&nbsp;&nbsp;选择城市</li>  
     <li class="exit"><a href="javascript:dsy.close()">关闭</a>&nbsp;&nbsp;</li>  
 </ul>  
 <div id=