目前共有2篇帖子。 内容转换:不转换▼
 
点击 回复
70 1
完美Ajax实例
初入江湖 七级
1楼 发表于:2010-12-25 09:49

<!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>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
<script src="../Scripts/prototype.js"></script>
<script>
function b(){
 var ob=new Object();
 var url="Untitled-1.php";
 ob.method="post";
 ob.parameters="s="+encodeURIComponent(encodeURIComponent($F('textfield')));
 ob.onComplete=function(q){
  alert(q.responseText);
 }
 return new Ajax.Request(url,ob);
}
</script>
</head>

<body>
<form action="" method="post" name="form1" id="form1" onsubmit="b();return false">
  <label>
  <input name="textfield" type="text" id="textfield" value="" />
  </label>
  <label>
  <input type="submit" name="button" id="button" value="提交" />
  </label>
</form>
</body>
</html>

初入江湖 七级
2楼 发表于:2010-12-25 09:49
<?php
echo urldecode(iconv("utf-8","gbk",$_POST['s']));
?>

回复帖子

内容:
抱歉,系统已内测完毕,本吧不能发帖
抱歉,系统已内测完毕,本吧不能发帖
用户名: 您目前是匿名发表
(快捷键:Ctrl+Enter)
 

本帖信息

点击数:70 回复数:1
评论数: ?
作者:产品的注销
最后回复:产品的注销
最后回复时间:2010-12-25 09:49
 
©2010-2024 Arslanbar Ver2.0
除非另有声明,本站采用知识共享署名-相同方式共享 3.0 Unported许可协议进行许可。