脚本宝典收集整理的这篇文章主要介绍了如何使用PHP和jQuery成功发布表单时显示警报?,脚本宝典觉得挺不错的,现在分享给大家,也给大家做个参考。
$.post( 'name.PHP',{ ime: ime,location: location },function(data){ if (data.success) { alert("form posted!"); } else { $("#diaLOG-form").dialog("oPEn"); } },"json" );
========================== PHP ============
if ($result == false) { echo json_encode(array('success' => false,'result' => 0)); exIT; } echo json_encode(array('success' => true,'result' => $result)); $sql2 = "DELETE From $names WHERE name='$ime'"; $result2 = MysqL_query($sql2);
尝试:
$.post( 'name.PHP',function(data){ if (data.success == 'true') { alert("form posted!"); } else { $("#dialog-form").dialog("open"); } },"json"
);
@L_301_1@
以上是脚本宝典为你收集整理的如何使用PHP和jQuery成功发布表单时显示警报?全部内容,希望文章能够帮你解决如何使用PHP和jQuery成功发布表单时显示警报?所遇到的问题。
本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。