100分邀请高手解决:表单提交后,用js的goback后退后内容全没了
表单提交后,用js的goback后退后内容全没了。
找了N多文章,没找到原因。
我加了个头,在firefox中可以后退了,在IE6、7、8中仍然不可以。
我加的header如下:
@header ( 'Cache-Control: store, no-cache, must-revalidate' );
哪位能解决的,一百分全送。当前只给了十分,怕没人能解决,浪费了,解决了一定加分送上
别告诉我什么在当前页面验证。绕过去的方法很多,我只想解决这个问题,不想绕过去!!!
有兴趣的可以下载下面页面去试试。
我把页面内容也贴出来吧:
---------------------a.php------------------------------
<?php
session_start();
$_SESSION['aaa'] = "aaaaaaaaaaaa";
?>
<!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>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
</head>
<body>
<form id="form1" name="form1" method="post" action="b.php">
<input type="text" name="textfield" id="textfield" />
<input type="submit" name="button" id="button" value="Submit" />
</form>
</body>
</html>
---------------------b.php------------------------------
<?php session_start();?>
<!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>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<script type="text/javascript">
window.onload = function() {
alert("go back <?=$_SESSION['aaa']?>");
window.history.go(-1);
}
</script>
</head>
<body>
</body>
</html>
找了N多文章,没找到原因。
我加了个头,在firefox中可以后退了,在IE6、7、8中仍然不可以。
我加的header如下:
@header ( 'Cache-Control: store, no-cache, must-revalidate' );
哪位能解决的,一百分全送。当前只给了十分,怕没人能解决,浪费了,解决了一定加分送上
别告诉我什么在当前页面验证。绕过去的方法很多,我只想解决这个问题,不想绕过去!!!
有兴趣的可以下载下面页面去试试。
我把页面内容也贴出来吧:
---------------------a.php------------------------------
<?php
session_start();
$_SESSION['aaa'] = "aaaaaaaaaaaa";
?>
<!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>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
</head>
<body>
<form id="form1" name="form1" method="post" action="b.php">
<input type="text" name="textfield" id="textfield" />
<input type="submit" name="button" id="button" value="Submit" />
</form>
</body>
</html>
---------------------b.php------------------------------
<?php session_start();?>
<!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>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<script type="text/javascript">
window.onload = function() {
alert("go back <?=$_SESSION['aaa']?>");
window.history.go(-1);
}
</script>
</head>
<body>
</body>
</html>
...全文
相关推荐
vue组件中使用iframe元素的示例代码
例如,我们可以使用 CSS 样式来设置 iframe 元素的宽高和边框样式:```css#iframe { width: 100%; height: 100%; border: none; overflow
浏览器控件如何在PB中调用
- **返回上一页**:`ole_web.object.goBack()` 如果浏览器历史中有前一页,则返回到上一个页面。
php+JS使用大全
,默认100) // 返回值:布尔值 // 备 注:无 //-----------------------------------------------------------------------
vue实现app页面切换动画效果实例
下面是相关知识点的总结:一、Vue 路由配置在 Vue 中,路由配置是通过 vue-router 来实现的。在上面的代码中,我们可以看到路由的配置是通过 router/index.js 文件来实现的。
AddingNavigationBackFeaturetoAndroidWebView:向Android WebView添加导航返回功能。 单击教程链接
() { if (webView.canGoBack()) { webView.goBack(); } else { super.onBackPressed(); }}```此外,为了提供更好的用户体验


基础编程
