为何datagrid生成超级连接会引发 onbeforeunload事件?
请各位help
请各位help
解决方案 »
- [Session问题]遇到一个很奇怪的问题.100求解.
- Char控件显示图像和DropDownList绑定数据库
- 安装vs2010后,所有asp元素控件都成了未知元素
- 高手进来看看:未能加载文件或程序集
- GridView 控件中,如果自定义每一列的标题呢?
- 如何操作XML,急
- 在线,高手指点啊,我想得到dataset中的第一个表中的第一行的第二列的值怎么取到
- 三层架构 MODEL,USER实体类和ROLE实体类,死循环问题
- asp.net程序,怎么设置数据角色权限?
- 这样的数据库查询语句该如何写?
- 重新编译项目,session会丢失?这样调试非常不方便,有没有办法可以留住session?
- 走过路过不要错过啊!小问题一个,在线等!!!
datagrid生成的时候,有几个给你选择的吗,_self,_blank等
事件
目的为了离开页面时。有个提示。
但为点击连接列时就会提示
Close the current browser window.
Navigate to another location by entering a new address or selecting a Favorite.
Click the Back, Forward, Refresh, or Home button.
Click on an a that refers the browser to another Web page.
Invoke the a click method.
Invoke the document write method.
Invoke the document open method.
Invoke the document close method.
Invoke the window close method.
Invoke the window open method, providing the possible value _self for the window name.
Invoke the window navigate or NavigateAndFind method.
Invoke the location replace method.
Invoke the location reload method.
Specify a new value for the location href property.
Submit a form to the address specified in the action attribute via the input type=submit control, or invoke the form submit method.
离开页面的提示你可以尝试用javascript写在页面里
具体我javascript很菜,临时写不出代码
类似于body里面的onload吧
点击超连接->关闭本页->发送到服务器->生成新的页面->发送到客户端
我想在未保存状态时,离开本页时出现一个是否离开提示窗口。
如果大家有什么具体好的方法,请help me .
初使一个全局变量ISPostBack的值为false;
_dopostback方法
theform.submit();之前
动态改变某一个全局变量的值为true;
但不知为何datagrid 超级连接列
<td><a href="javascript:_dopostback('datagrid1_..','')商品编码</a></td>
就无法更改此全局变量,document.body.onbeforeunload()
{
if(!ISPostBack)
event.returnvalue="是否要离开?";
}
{
if(!ISPostBack)
event.returnvalue="是否要离开?";
}
Response.Write("<script language=javascript>if(!window.confirm('您尚未保存信息,是否离开?')){return;}</script>");
问题某些连接列都会触发这个事件啊,如何区分》?