易截截图软件、单文件、免安装、纯绿色、仅160KB

jquery php ajax

<!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>
<title> TEST </title>
<meta name="generator" content="editplus" />
<meta name="author" content="" />
<meta name="keywords" content="" />
<meta name="description" content="" />
<mce:script type="text/javascript" src="jquery-1.3.2.min.js" mce_src="menu/script/jquery-1.3.2.min.js"></mce:script>
<mce:script type="text/javascript"><!--
$(document).ready( function () {
$('#btn').click ( function () {
$.ajax({
url: '1.php',
type: 'POST',
data:'name='+$('#name').val(),
dataType: 'html',
timeout: 1000,
error: function(){
alert('Error loading XML document');
},
success: function(html){
if(html==""){
alert("Please input what you want to say~!");
}else{
$('#text').html(html);
}
}
});
});
})
// --></mce:script>
</head>
<body>
<input type="text" id="name" name="name" />
<input type="button" value="DO IT ." id="btn"/>
<hr />
<div id="text" style="color:red;" mce_style="color:red;"></div>
</body>
</html>

<?php
if(!isset($_POST['name']) || $_POST['name']=="" ) {
echo "";
} else {
echo "you say : ".$_POST['name'];
}
?>


相关文档:

php之XML转数组函数

<?
/**
* xml2array() will convert the given XML text to an array in the XML structure.
* Link: http://www.bin-co.com/php/scripts/xml2array/
* Arguments : $contents - The XML text
* $get_attributes - 1 or 0. If this is 1 the function will get the attributes as well as the ......

25个PHP游戏编程脚本代码


本文介绍的脚本易于理解、使用简单并可以快速掌握。
简单的掷骰器
许多游戏和游戏系统都需要骰子。让我们先从简单的部分入手:掷一个六面骰子。实际上,滚动一个六面骰子就是从 1 到 6 之间选择一个随机数字。在 PHP 中,这十分简单:echo rand(1,6);。
在许多情况下,这基本上很简单。但是在处理机率游戏时,我们需要 ......

PHP多用户在线客服系统

PHP多用户在线客服系统,后台有代码镶嵌到你的系统中,不过这个是英文的,感觉很实用,简洁,方便,需要的可以自己汉化,不就是改里面的一些提示信息嘛,地址是:http://mibew.org/
,这个是开源的,支持多用户同时在线联系客服,客服后台及时性很强,只要用户点击在线客服,后台就有提示,而且可以查看聊天记录,很多实用 ......

php中发送邮件的方法


   php中有两种方法:
         1,通过mail()函数发送
          2,Socket发送邮件
一,通过mail()函数发送:
   1,需要配置php.ini邮件信息
        打开php.in ......

PHP读取MSSQL数据出现乱码的问题

PHP读取MYSQL数据库或MSSQL数据库时,有时出现乱码,这是PHP.ini中配置和.php页面编码不一致引起的。
解决办法:
1、首先,将PHP.ini中设置为default_charset = "gb2312",然后重启Apache。
   这时从数据库中提取的结果集可以正常显示中文了,但.php页面中的列名也有可能显示乱码了。这样解决,
2、然后,PH ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号