日期:2014-05-17 浏览次数:20529 次
<%@ 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 runat="server">
<title>无标题页</title>
<script src="jquery-1.3.2-vsdoc.js" type="text/javascript"></script>
<script type="text/javascript">
$(function() {
$("#DropDownList1").change(function() {
var i = 0;
var ddlVal = $(this).val();
$("#DropDownList1 option").each(function() {
var oval = $(this).val();
if (oval == ddlVal) {
$("#Hidden1").val(i);
return;
}
i++;
});
form1.submit();
})
});
</script>
</head>
<body>
<form id="form1" name="form1" method="get" runat="server">
<input id="Hidden1" name="Hidden1" type="hidden" />
<asp:DropDownList ID="DropDownList1" runat="server">
<asp:ListItem>
1
</asp:ListItem>
&nb