Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

PHP+AJAX ÐÂÊÖÌáÎÊ - PHP / Framework

ÎÒÏëѧϰһÏÂAJAX£¬°´×ÅÍøÉϵÄʵÀýÊÔÁËһϣ¬Ìá½»ºóûÓÐÈκη´Ó¦£¬Çë¸ßÊÖÖ¸½ÌÒÔÏ£¬´úÂëÈçÏ£¬
<script language="javascript">
function saveUserInfo()
{
//»ñÈ¡½ÓÊÜ·µ»ØÐÅÏ¢²ã
var msg = document.getElementById("msg");

//»ñÈ¡±íµ¥¶ÔÏóºÍÓû§ÐÅÏ¢Öµ
var f = document.user_info;
var userName = f.user_name.value;
var userAge = f.user_age.value;
var userSex = f.user_sex.value;

//½ÓÊÕ±íµ¥µÄURLµØÖ·
var url = "/login_mng.php";

//ÐèÒªPOSTµÄÖµ£¬°Ñÿ¸ö±äÁ¿¶¼Í¨¹ý&À´Áª½Ó
var postStr = "user_name="+ userName +"&user_age="+ userAge +"&user_sex="+ userSex;
//alert(postStr);
//ʵÀý»¯Ajax
//var ajax = InitAjax();


  var ajax = false;
  //¿ªÊ¼³õʼ»¯XMLHttpRequest¶ÔÏó
  if(window.XMLHttpRequest) { //Mozilla ä¯ÀÀÆ÷
  ajax = new XMLHttpRequest();
  if (ajax.overrideMimeType) {//ÉèÖÃMiMEÀà±ð
  ajax.overrideMimeType("text/xml");
  }
  }
  else if (window.ActiveXObject) { // IEä¯ÀÀÆ÷
  try {
  ajax = new ActiveXObject("Msxml2.XMLHTTP");
  } catch (e) {
 


Ïà¹ØÎÊ´ð£º

ajax post·½Ê½Ìá½»Êý¾ÝÈçºÎ²Ù×÷£¿ - Web ¿ª·¢ / Ajax

RT£¡
xmlHttpRequest.send("Ìá½»²ÎÊýÃû=Öµ&Ìá½»²ÎÊýÃû1=Öµ");

var date={"Êý¾Ý1":"Êý¾Ý1Öµ","Êý¾Ý2":"Êý¾Ý2Öµ","Êý¾Ý3":"Êý¾Ý3Öµ" ......

ÎÊÒ»¸öPHPºÍsmartyµÄÈÕÆÚÎÊÌâ - PHP / »ù´¡±à³Ì

index.phpÄÚÈÝ£º
  $smarty->assign('name',strtotime('-0'));
  $smarty->display("index.html");
index.htmlÄÚÈÝ£º
{$name|date_format:'%Y-%m-%d'}<hr>
{$ ......

AjaxÎÞ·¨µ÷ÓÃÎÊÌâ - Web ¿ª·¢ / Ajax

´úÂëÖУ¬Èç¹û½«//alert(1)¡¡×¢ÊÍ´ò¿ª£¬ÄÇô¾Í¿ÉÒÔµ÷Óã¬Èç¹û×¢Ê͵ô¾ÍÎÞ·¨µ÷ÓÃ
»³ÒÉÊǵ¼JSÎļþ³öÎÊÌâÁË£¬ÒòΪд¹ýjspÒýÁ½¸öJSÎļþûÎÊÌ⣬
¶øJSPÒýÒ»¸öJSÎļþ£¬Õâ¸öJSÒý±ðÍâµÄJSÎļþ³öÏÖÏÂÃæÎÊÌ⣬ÉÏÍøÕÒÁË°ëÌìû½á ......

php session ¶ªÊ§ - PHP / »ù´¡±à³Ì

ÔÚfirefoxä¯ÀÀÆ÷ÏÂÕý³£µÇ½£¬µ«ÔÚIE ä¯ÀÀÆ÷ÏÂÎÞ·¨µÇ½£¬Ã¿´Î¶¼»áÖØÐÂÉú³ÉÒ»¸ösession,Ô­À´µÄÄÚÈݻᶪʧ¡£¡£¡£¡£¡£¡£¡£¡£¡£¡£Ôõô»ØÊÂ......
¾ßÌåÇé¿ö£¿²Â²â¿ÉÄÜÊÇÄã±¾»úIEµÄcookie±»½ûÓÃÁË°É£¬¿ÉÒÔ¿´¿´

cookie Æ ......

PHPÈçºÎÉèÖÃÒ³Ã滺´æ1ÐÇÆÚ - PHP / »ù´¡±à³Ì

ÈçÌ⣬Ôõôд¸öheadÍ·²¿ ÈÃÒ³Ã滺´æ1ÐÇÆÚ¡£
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
Äã°ÑÀïÃæµÄʱ¼ä£¬¸Ä³Éµ±Ç°Ê±¼ä¼ÓÉÏÒ»¸öÐÇÆÚ
¼ÇµÃҪת»»³Égmtʱ¼ä

ÎÒÕâÑùдµÄ ²»ÖªµÀÐв»ÐС£
Ò»¸öÐ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ