All articles| All Pictures| All Softwares| All Video| Go home page| Write articles| Upload pictures

Reading number is top 10 articles
C#网络应用编程基础练习题与答案(六)_[Asp.Net教程]
如何在Asp.net中使用HtmlArea编辑器_[Asp.Net教程]
SQL,Server,2000安装和基本框架_mssql学习_编程技术
C#中位图类型
PHP正则表达式使用的方法_[PHP教程]
C#中MaskedTextBox控件的用法以及实例
用GoLive实现CSS+DIV_[Html教程]
事半功倍之javascript(2)_JavaScript技术_编程技术
正确理解C#中的ref关键字_.net资料_编程技术
浅谈PHP开发团队管理及程序员做人问题_php资料_编程技术
Reading number is top 10 pictures
The hot big eye big breast beauty2
The real super beauty3
The woman fight much more than men
Ashlynn Brooke a group sexy photo2
The money of more than 100 countries and regions18
Sora aoi on twitter3
Discharge accidentally Actresses by the breast2
Absolutely shocked. National geographic 50 animal photographys2
可爱的狗熊们
Female star bikini
Download software ranking
艳兽都市
C#程序员参考手册
WebService在.NET中的实战应用教学视频 → 第2集
Eclipse 4.2.1 For Win32
Unix video tutorial3
matrix2
Unix video tutorial15
Unix video tutorial7
天龙八部最新服务端
jdk1.6 for windows
归海一刀 published in(发表于) 2014/2/17 7:34:47 Edit(编辑)
PHP技巧-巧用jquery达到无刷新删除效果_[PHP教程]

PHP技巧-巧用jquery达到无刷新删除效果_[PHP教程]

PHP技巧:巧用jquery达到无刷新删除效果_[PHP教程]

















本教程运用jquery.js来达到ajax和dom无刷新删除效果,第一步加入:

给table加个
id="t

"
写个js:

删除链接改成
href="javascript:delItem(’

’)"
delete.php的修改就是把错误语句改成直接输出就行了。
OK完成。

index.tpl :




所有留言







Welcome:


退出



登录
注册



发表留言





" width="700" border="0" cellspacing="0" cellpadding="0" class="tb">





[

]
发表于:




















附件:


















修改 删除& lt;!--{/if}-->


















delete.php :
require(’common.php’);
// 查询出留言信息
$q = $query->query(’select * from gb_content where id=’.intval($_GET[’id’]));
$rs = $query->fetch_array($q);
$error = array();
if ($rs[’user_id’]!=intval($_SESSION[’user_id’])) {// 判断user_id是否相同
$error = ’该信息你不能删除,只能删除自己发布的’;
}
if (!$error) {
$query->query(’delete from gb_content where id=’.intval($_GET[’id’]));//删除语句
if ($rs[’user_file’]) {//删除附件
@unlink(’uploads/’.$rs[’user_file’]);
}
echo 1;//表示成功
} else {
echo $error;
}
?>






























添加到del.icio.us 添加到新浪ViVi 添加到百度搜藏 添加到POCO网摘 添加到天天网摘365Key 添加到和讯网摘 添加到天极网摘 添加到黑米书签 添加到QQ书签 添加到雅虎收藏 添加到奇客发现 diigo it 添加到饭否 添加到飞豆订阅 添加到抓虾收藏 添加到鲜果订阅 digg it 貼到funP 添加到有道阅读 Live Favorites 添加到Newsvine 打印本页 用Email发送本页 在Facebook上分享


Disclaimer Privacy Policy About us Site Map

If you have any requirements, please contact webmaster。(如果有什么要求,请联系站长)
Copyright ©2011-
uuhomepage.com, Inc. All rights reserved.