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

推荐订阅源

H
Help Net Security
博客园 - Franky
GbyAI
GbyAI
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
爱范儿
爱范儿
IT之家
IT之家
酷 壳 – CoolShell
酷 壳 – CoolShell
aimingoo的专栏
aimingoo的专栏
博客园_首页
MongoDB | Blog
MongoDB | Blog
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
Recent Announcements
Recent Announcements
Scott Helme
Scott Helme
有赞技术团队
有赞技术团队
M
MIT News - Artificial intelligence
C
CERT Recently Published Vulnerability Notes
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
Jina AI
Jina AI
F
Fortinet All Blogs
N
Netflix TechBlog - Medium
L
LangChain Blog
L
LINUX DO - 最新话题
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
H
Hacker News: Front Page
MyScale Blog
MyScale Blog
P
Palo Alto Networks Blog
G
Google Developers Blog
Google DeepMind News
Google DeepMind News
AI
AI
T
Troy Hunt's Blog
Microsoft Azure Blog
Microsoft Azure Blog
阮一峰的网络日志
阮一峰的网络日志
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
Vercel News
Vercel News
Microsoft Security Blog
Microsoft Security Blog
罗磊的独立博客
S
Secure Thoughts
大猫的无限游戏
大猫的无限游戏
博客园 - 叶小钗
人人都是产品经理
人人都是产品经理
Blog — PlanetScale
Blog — PlanetScale
博客园 - 司徒正美
Apple Machine Learning Research
Apple Machine Learning Research
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
博客园 - 三生石上(FineUI控件)
S
Security @ Cisco Blogs
Cloudbric
Cloudbric
E
Exploit-DB.com RSS Feed
Attack and Defense Labs
Attack and Defense Labs

博客园 - 慕晓

10.23 关注 可中期关注的股票 关于利润率的趋同 为什么要学ruby? 到底用哪个blog好。 富人更富,穷人更穷 在 javascript中调用WebService(转) - 慕晓 - 博客园 请问有没有c#.net的讲师或者类似的人或公司? 微软拼音输入法3.0 在 ie 中有MaxLength 的 textbox 框中输入的bug 把Linux 的线程操作封装在类里面 发现word的一个bug :项目符号和编号 中 多级符号 如何更改级别? 提问:使用何种模式? 重新构造我现有软件的结构(一) 发现了个叫做saie.exe的spyware程序 数据库连接的位置 我画的数据库的关系 简单介绍 求助:asp.net无法调试,为什么? 自己写的vss使用文档,入门级别的,大家随便看看
关于默认按钮
慕晓 · 2005-02-20 · via 博客园 - 慕晓

我做了个登陆的页面,上面只有一个button 是个webcontrol,另外还有个文本框,可是在文本框输入回车的时候却不是激发 button的onclick事件。。这是为什么呢?直接点击这个button是可以正确执行的,没有问题。
aspx文件如下

<%@ Page language="c#" Codebehind="Login.aspx.cs" AutoEventWireup="false" Inherits="gx.Login" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<HTML>
    
<HEAD>
        
<title>Login</title>
        
<meta content="Microsoft Visual Studio .NET 7.1" name="GENERATOR">
        
<meta content="C#" name="CODE_LANGUAGE">
        
<meta content="JavaScript" name="vs_defaultClientScript">
        
<meta content="http://schemas.microsoft.com/intellisense/ie5" name="vs_targetSchema">
    
</HEAD>
    
<body MS_POSITIONING="GridLayout">
        
<form id="Form1" method="post" runat="server">
            
<asp:label id="Label1" style="Z-INDEX: 101; LEFT: 176px; POSITION: absolute; TOP: 56px" runat="server">用户名</asp:label>
            
<asp:label id="Label2" style="Z-INDEX: 102; LEFT: 176px; POSITION: absolute; TOP: 96px" runat="server">密码</asp:label>
            
<asp:textbox id="TextBoxPassword" style="Z-INDEX: 103; LEFT: 248px; POSITION: absolute; TOP: 96px"
                runat
="server" TextMode="Password"></asp:textbox>
            
<asp:button id="ButtonLogin" style="Z-INDEX: 104; LEFT: 224px; POSITION: absolute; TOP: 168px"
                runat
="server" Text="登陆" Width="72px" Height="24px"></asp:button>
            
<asp:dropdownlist id="DropDownListUsername" style="Z-INDEX: 105; LEFT: 248px; POSITION: absolute; TOP: 56px"
                runat
="server" Width="152px" Height="24px" ForeColor="Black"></asp:dropdownlist>
            
<asp:Label id="LabelLoginHints" style="Z-INDEX: 106; LEFT: 200px; POSITION: absolute; TOP: 136px"
                runat
="server" Height="16px" Width="160px" Visible="False"></asp:Label></form>
    
</body>
</HTML>

生成的html页面源代码如下


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<HTML>
    
<HEAD>
        
<title>Login</title>
        
<meta content="Microsoft Visual Studio .NET 7.1" name="GENERATOR">
        
<meta content="C#" name="CODE_LANGUAGE">
        
<meta content="JavaScript" name="vs_defaultClientScript">
        
<meta content="http://schemas.microsoft.com/intellisense/ie5" name="vs_targetSchema">
    
</HEAD>
    
<body MS_POSITIONING="GridLayout">
        
<form name="Form1" method="post" action="login.aspx" id="Form1">
<input type="hidden" name="__VIEWSTATE" value="dDwtMjAyODkxODIxNDt0PDtsPGk8MT47PjtsPHQ8O2w8aTw5Pjs+O2w8dDx0PHA8cDxsPERhdGFNZW1iZXI7RGF0YVRleHRGaWVsZDs+O2w8WW9uZ2h1O21pbmdjaGVuZzs+Pjs+O3Q8aTwxPjtAPGFkbWluOz47QDxhZG1pbjs+Pjs+Ozs+Oz4+Oz4+Oz6mXAwirhGRHCGNRsa9w1rNH6t3GA==" />

            
<span id="Label1" style="Z-INDEX: 101; LEFT: 176px; POSITION: absolute; TOP: 56px">用户名</span>
            
<span id="Label2" style="Z-INDEX: 102; LEFT: 176px; POSITION: absolute; TOP: 96px">密码</span>
            
<input name="TextBoxPassword" type="password" id="TextBoxPassword" style="Z-INDEX: 103; LEFT: 248px; POSITION: absolute; TOP: 96px" />
            
<input type="submit" name="ButtonLogin" value="登陆" id="ButtonLogin" style="height:24px;width:72px;Z-INDEX: 104; LEFT: 224px; POSITION: absolute; TOP: 168px" />
            
<select name="DropDownListUsername" id="DropDownListUsername" style="color:Black;height:24px;width:152px;Z-INDEX: 105; LEFT: 248px; POSITION: absolute; TOP: 56px">
    
<option value="admin">admin</option>

</select>
            
</form>
    
</body>
</HTML>

<%@ Page language="c#" Codebehind="Login.aspx.cs" AutoEventWireup="false" Inherits="gx.Login" %>可以看到input type=submit 的确在 form里面,可是就是没有效果,这是为什么呢?
多谢各位达人了