zoukankan
html css js c++ java
asp.net 2.0 中无刷新机制
<%
@ Page Language
=
"
C#
"
%>
<%
@ Implements Interface
=
"
System.Web.UI.ICallbackEventHandler
"
%>
<!
DOCTYPE html PUBLIC
"
-//W3C//DTD XHTML 1.1//EN
"
"
http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd
"
>
<
script runat
=
"
server
"
>
protected
void
Page_Load(
object
sender, EventArgs e)
{
string
callback
=
this
.ClientScript.GetCallbackEventReference(
this
,
"
this.value
"
,
"
ProcessReverse
"
,
null
);
this
.TextBox1.Attributes.Add(
"
onchange
"
, callback);
}
string
ICallbackEventHandler.RaiseCallbackEvent(
string
eventArgument)
{
char
[] chars
=
eventArgument.ToCharArray();
Array.Reverse(chars);
return
new
string
(chars);
}
</
script
>
<
html xmlns
=
"
http://www.w3.org/1999/xhtml
"
>
<
head id
=
"
Head1
"
runat
=
"
server
"
>
<
title
>
Untitled Page
</
title
>
</
head
>
<
body
>
<
form id
=
"
form1
"
runat
=
"
server
"
>
<
div
>
<
asp:TextBox ID
=
"
TextBox1
"
Runat
=
"
server
"
></
asp:TextBox
>
</
div
>
</
form
>
</
body
>
</
html
>
<
script
>
function ProcessReverse(result,context)
{
alert(result)
document.all.TextBox1.value
=
result;
}
</
script
>
查看全文
相关阅读:
Polly
ELK
Python基础三(选择,循环)
Python基础二(输入与输出)
Python关键字
Python基础一(基本类型和运算符)
Python发展史
在虚拟机(vmware)上安装CentOS
centos7联网
Hashmap的实现
原文地址:https://www.cnblogs.com/goodspeed/p/35796.html
最新文章
rem
【数组】Next Permutation
【数组】Remove Duplicates from Sorted Array II
【数组】Rotate Image
【数组】Search a 2D Matrix
【数组】Search for a Range
【数组】Search Insert Position
【数组】Set Matrix Zeroes
【数组】Sort Colors
attachEvent和addEventListener区别总结
热门文章
【数组】Spiral Matrix II
【数组】Spiral Matrix
npm publish
微信 dat 文件还 荐
exim4
gitee 删库跑路的正确打开方式
kafka
Docker
Swagger
SqlSugar
Copyright © 2011-2022 走看看