会员
周边
众包
新闻
博问
闪存
赞助商
所有博客
当前博客
我的博客
我的园子
账号设置
简洁模式
...
退出登录
注册
登录
anson
专注于.Net开发
博客园
首页
新随笔
联系
管理
订阅
Prototype学习笔记之-Ajax.Request
Ajax.Request 传中文出现乱码。
Prototype学习笔记,试用Ajax.Request,发现个问题,先记下来。
传了个参数进去,发现传中文会出现乱码!
<
script
src
="js/prototype.js"
type
="text/javascript"
></
script
>
<
script
type
="text/javascript"
>
function
ExecuteAjax()
{
var
id
=
$F('empid');
var
url
=
'http:
//
localhost/MyASPNETAJAX/AjaxDemo.aspx';
var
prams
=
'id
=
'
+
id;
var
myAjax
=
new
Ajax.Request(url,
{method:'get',parameters:prams,onLoading:loading,onComplete:ShowResult}
);
}
function
ShowResult(Result)
{
$('resultdiv').value
=
Result.responseText;
$('showloading').style.display
=
"
none
"
;
}
function
loading()
{
$('showloading').innerHTML
=
"
加载中,请稍后
.
"
;
}
</
script
>
<
select
id
="empid"
onchange
="ExecuteAjax()"
>
<
option
value
="
第一项
11"
>
第一项
</
option
>
<
option
value
="222222"
>
第二项
</
option
>
<
option
value
="333333"
>
第三项
</
option
>
</
select
>
<
textarea
id
="resultdiv"
cols
="60"
rows
="10"
></
textarea
>
<
div
id
="showloading"
></
div
>
posted @
2006-11-07 10:54
ansonpan
阅读(
1078
) 评论(
0
)
编辑
收藏
举报
会员力量,点亮园子希望
刷新页面
返回顶部
公告