111,094
社区成员




<script src="js/jquery-1.4.2.min.js"type="text/javascript"></script>
<script type="text/javascript" language="javascript">
alert(window.location);
function testAjax() {
$.post('Default4.aspx',{ url:window.location.href },function (text, status) { alert(text); });
}
</script>
$.ajax({
type: "POST",// 使用get方法访问后台
url: "SaveEigenMedia.aspx",
data: "act=GetSectionPoint&id=" + $("#txtColumnSectionID" ).val(),
success: function(msg) {
//msg就是response写入的信息
}
});
后台
string action = RmsRequest.GetString("act" );
switch (action.ToLower())
{
case "dropmap" :
AjaxDeleteSelectMap( RmsRequest.GetInt("id" , 0));
break;
case "getsectionpoint" :
GetSectionPoint( RmsRequest.GetInt("id" , 0));
break;
}
private void GetSectionPoint(int SectionID)
{
Response.Clear();
string secId = SectionID + "" ;
if (points == null )
{
points = GetPointsInit();
}
if (points.ContainsKey(secId))
{
Response.Write(points[secId].PointX + "#" +
points[secId].PointY);
}
Response.End();
}
public ActionResult Address(string address)
{
Return address;
}
$.post('Default4.aspx',address,function{}());这样就可以了