惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Attack and Defense Labs
Attack and Defense Labs
The GitHub Blog
The GitHub Blog
C
Check Point Blog
博客园_首页
MongoDB | Blog
MongoDB | Blog
N
Netflix TechBlog - Medium
F
Full Disclosure
Microsoft Security Blog
Microsoft Security Blog
爱范儿
爱范儿
Recent Announcements
Recent Announcements
阮一峰的网络日志
阮一峰的网络日志
G
GRAHAM CLULEY
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
T
Threat Research - Cisco Blogs
C
Cybersecurity and Infrastructure Security Agency CISA
V
Vulnerabilities – Threatpost
K
Kaspersky official blog
博客园 - 司徒正美
S
Schneier on Security
T
The Exploit Database - CXSecurity.com
Project Zero
Project Zero
云风的 BLOG
云风的 BLOG
Cisco Talos Blog
Cisco Talos Blog
Know Your Adversary
Know Your Adversary
雷峰网
雷峰网
V
V2EX - 技术
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
Spread Privacy
Spread Privacy
罗磊的独立博客
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
S
Security Affairs
SecWiki News
SecWiki News
Schneier on Security
Schneier on Security
O
OpenAI News
Jina AI
Jina AI
PCI Perspectives
PCI Perspectives
Cyberwarzone
Cyberwarzone
Y
Y Combinator Blog
Apple Machine Learning Research
Apple Machine Learning Research
B
Blog RSS Feed
I
InfoQ
D
Docker
P
Palo Alto Networks Blog
Recorded Future
Recorded Future
M
MIT News - Artificial intelligence
博客园 - Franky
B
Blog
Scott Helme
Scott Helme
博客园 - 叶小钗
D
DataBreaches.Net

博客园 - 磊.NET

中软酒店管理系统之会员消费短信提醒工具开发 ClickOnce发布时,资源文件添加问题 - 磊.NET - 博客园 在读取或者保存word时,程序捕获到word异常“word无法启动转换器mswrd632 wpc” 工作基本搞定--等待周五入职 QQ抢车位助手(结尾) QQ抢车位外挂(续) QQ抢车位外挂(起始篇)--小研究成果展示 programmer的出路 访问IIS元数据库失败 一个随机产生中文简体字的一个类 返回字符串长度(汉字长度为2) 今天开始super map---网上搜车 注册DLL文件 c# 象素和毫米单位转换 ToString()格式和用法大全 asp.net - 关于获取在线用户的方式(不知道有没好的办法) 工作几个月之小总结--半夜刚刚完成工作篇 JS弹出式对话框,有确认取消 按扭 工作压力改变了我?
使用JS提交刷新本页 - 磊.NET - 博客园
磊.NET · 2007-09-02 · via 博客园 - 磊.NET

这个问题是我在使用JS刷新页面时遇见的
我就是想在使用JS完成操作后,再PageLoad下页面,使我的后台代码能够顺利执行
ASPX页的代码如下,后台不需要任何代码,如果想看效果
在PageLoad里加个断点就可以了  你就可以看见每次PageLoad了

<%@ 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>
</head>
<body>
<script language="javascript" type ="text/javascript">
//Load信息(生成XML文件)
function pageLoad()
{
     
//给TextBox1设置一个焦点
     document.getElementById('TextBox1').focus();
     
//利用提交请求刷新页面(无刷新的)
     httpobj=new ActiveXObject("Microsoft.XMLHTTP");
     tempfile
="Default.aspx?ok=false";
     httpobj.open(
"post",tempfile,false);
     httpobj.send();
    
}


</script>


    
<form id="form1" runat="server">
    
<div>
    
        
<asp:TextBox ID="TextBox1" runat="server" AutoPostBack="False"
            Style
="position: relative"></asp:TextBox>
            
        
<input id="Button1" style="position: relative" type="button" value="button" onclick="pageLoad();return false;" />
       
</div>
       
       
        
    
</form>
</body>
</html>