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

推荐订阅源

Jina AI
Jina AI
T
The Blog of Author Tim Ferriss
G
Google Developers Blog
P
Privacy & Cybersecurity Law Blog
SecWiki News
SecWiki News
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
Hacker News: Ask HN
Hacker News: Ask HN
Engineering at Meta
Engineering at Meta
Hugging Face - Blog
Hugging Face - Blog
PCI Perspectives
PCI Perspectives
www.infosecurity-magazine.com
www.infosecurity-magazine.com
T
The Exploit Database - CXSecurity.com
博客园_首页
Latest news
Latest news
T
Threat Research - Cisco Blogs
N
News and Events Feed by Topic
TaoSecurity Blog
TaoSecurity Blog
罗磊的独立博客
月光博客
月光博客
C
Cisco Blogs
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
V
V2EX
Last Week in AI
Last Week in AI
Cloudbric
Cloudbric
MyScale Blog
MyScale Blog
Spread Privacy
Spread Privacy
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
P
Proofpoint News Feed
G
GRAHAM CLULEY
N
News and Events Feed by Topic
MongoDB | Blog
MongoDB | Blog
N
Netflix TechBlog - Medium
M
MIT News - Artificial intelligence
I
InfoQ
Microsoft Security Blog
Microsoft Security Blog
人人都是产品经理
人人都是产品经理
K
Kaspersky official blog
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
量子位
I
Intezer
Microsoft Azure Blog
Microsoft Azure Blog
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
A
About on SuperTechFans
D
DataBreaches.Net
宝玉的分享
宝玉的分享
S
Security @ Cisco Blogs
Help Net Security
Help Net Security
Hacker News - Newest:
Hacker News - Newest: "LLM"

博客园 - cp

HR:.Net(Senior)Software Engineer/Project Leader IT Consulting Positions (Senior Level) Software Sales Engineer / Software Engineer Scott Gu上海见面会 有个朋友公司急召C++程序员 对比面向对象和面向服务 预告一下接下来要写的心得 C# 3.0 规范(PDC2005)中文word版本 C#3.0规范(七)对象以及集合构造者 关于ComponentArt Web.UI 2006.1(build 1208)源代码之若干说明 ComponentArt Web.UI 2006.1 源代码 C#3.0规范(六)重载决断 C#3.0规范(五)类型推断 C#3.0规范(四)Lambda 表达式 C#3.0规范(三)扩展函数 C#3.0(二)隐式类型化的本地变量 C#3.0规范(一)C#3.0概述 IIS不工作 Const n = 234234245#
[导入]一个使用的小问题
cp · 2005-11-16 · via 博客园 - cp

被人问这么个问题:

要在asp.net中Button事件触发之前调用确认或者取消的javascript代码,如何做到?

下面是我的回答:

现在看来很简单。

<asp:Button id="Button1" OnClientClick="return confirm('确认操作?')" OnClick="Button_Click" runat="server"/>

后台代码如下:

protected void Button_Click(object sender, EventArgs e)

{

//处理你要做的事情,例如,操作数据库等;

}

顺便提一句,很多人不知道javascript,包括很多写了很长时间程序的人,上面有背景色的那行代码调用了javascript内置的一个函数--confirm([messenge]),效果是个确认的对话框。那么,javascript是什么呢?是个脚本语言,和java一点关系也没有,大家注意!!!那么这种语言的参考手册有没有?当然有啦,请在好点的搜索引擎里输入 javascript参考手册 并且回车,我保证你获得一大把。


文章来源:http://spaces.msn.com/members/cp612sh/Blog/cns!1pfA_zw39CRZT9gIKZiTkqsw!125.entry