test1.htm ==================== <script> var mxh1 = new Array("mxh","net_lover","孟子E章") var mxh2 = window.open("about:blank","window_mxh") // 向对话框传递数组 window.showModalDialog("test2.htm",mxh1) // 向对话框传递window对象 window.showModalDialog("test3.htm",mxh2) </script>test2.htm ==================== <script> var a = window.dialogArguments alert("您传递的参数为:" + a) </script>test3.htm ==================== <script> var a = window.dialogArguments alert("您传递的参数为window对象,名称:" + a.name) </script>
input type=hiddensession/application数据库一般常用就这三种
Web 中数据要刷新,必须提交到服务器,这点是最基本的~
第一个页面传参数过去 Response.Write("<script language='javascript'> window.open('webform3.aspx?no=" & DataGrid1.Items(DataGrid1.SelectedIndex).Cells(2).Text & "&mode=" & Dropdownlist1.SelectedValue & "') </script>") 第二个页面接收参数 Sub bindgrid(ByVal no As String) Dim str As String = "server=*;user id=*;pwd=*;database=*" Dim str1 = "select * from frequest where 单号='" & no & "'" Dim da As System.Data.SqlClient.SqlDataAdapter da = New SqlClient.SqlDataAdapter(str1, str) Dim dt As DataTable = New DataTable da.Fill(dt) '在文本框中显示前一页的datagrid中所选中行的字段值 TextBox1.Text = dt.Rows(0).Item(0).ToString TextBox2.Text = dt.Rows(0).Item(1).ToString TextBox3.Text = dt.Rows(0).Item(2).ToString end sub Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load '在此处放置初始化页的用户代码 Dim str, str1 As String If Not Page.IsPostBack Then str = Request.QueryString("no") str1 = Request.QueryString("mode") bindgrid(str) end sub楼主,是不是这个意思啊
showModelessDialog() (IE 5+ 支持)
window.showModalDialog()方法用来创建一个显示HTML内容的模态对话框,由于是对话框,因此它并没有一般用window.open()打开的窗口的所有属性。
window.showModelessDialog()方法用来创建一个显示HTML内容的非模态对话框。ModelessDialog()方法
====================
<script>
var mxh1 = new Array("mxh","net_lover","孟子E章")
var mxh2 = window.open("about:blank","window_mxh")
// 向对话框传递数组
window.showModalDialog("test2.htm",mxh1)
// 向对话框传递window对象
window.showModalDialog("test3.htm",mxh2)
</script>test2.htm
====================
<script>
var a = window.dialogArguments
alert("您传递的参数为:" + a)
</script>test3.htm
====================
<script>
var a = window.dialogArguments
alert("您传递的参数为window对象,名称:" + a.name)
</script>
Response.Write("<script language='javascript'> window.open('webform3.aspx?no=" & DataGrid1.Items(DataGrid1.SelectedIndex).Cells(2).Text & "&mode=" & Dropdownlist1.SelectedValue & "') </script>")
第二个页面接收参数
Sub bindgrid(ByVal no As String)
Dim str As String = "server=*;user id=*;pwd=*;database=*" Dim str1 = "select * from frequest where 单号='" & no & "'"
Dim da As System.Data.SqlClient.SqlDataAdapter
da = New SqlClient.SqlDataAdapter(str1, str)
Dim dt As DataTable = New DataTable
da.Fill(dt)
'在文本框中显示前一页的datagrid中所选中行的字段值
TextBox1.Text = dt.Rows(0).Item(0).ToString
TextBox2.Text = dt.Rows(0).Item(1).ToString
TextBox3.Text = dt.Rows(0).Item(2).ToString
end sub Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
'在此处放置初始化页的用户代码
Dim str, str1 As String
If Not Page.IsPostBack Then
str = Request.QueryString("no")
str1 = Request.QueryString("mode")
bindgrid(str)
end sub楼主,是不是这个意思啊