<rt id="bn8ez"></rt>
<label id="bn8ez"></label>

  • <span id="bn8ez"></span>

    <label id="bn8ez"><meter id="bn8ez"></meter></label>

    posts - 6, comments - 6, trackbacks - 0, articles - 0

    2007年4月16日

    <!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>
    <script type="text/javascript">
    /* Create a new XMLHttpRequest object to talk to the Web server */
    function getbw()
    {
        var xmlhttp;
     try {
      xmlhttp=new ActiveXObject("Msxml2.XMLHTTP");
     } catch (e) {
      try {
       xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
      } catch (oc) {
       xmlhttp=null;
      }
     }
     if(!xmlhttp && typeof XMLHttpRequest != "undefined")
      xmlhttp = new XMLHttpRequest();
    return xmlhttp;
    }
     
        function IDRequest(n) {
     xmlhttp=getbw();
        //定義收到服務(wù)器的響應(yīng)后需要執(zhí)行的JavaScript函數(shù)
        url=n+document.getElementById('163id').value;//定義網(wǎng)址參數(shù)
        alert(url);
     xmlhttp.open("GET",url, true);       
     xmlhttp.send(null);        
        //xmlhttp_request=getXMLRequester();//調(diào)用創(chuàng)建XMLHttpRequest的函數(shù)       
        xmlhttp.onreadystatechange = doContents;//調(diào)用doContents函數(shù)       

        }   
        function doContents() {       
        if (xmlhttp.readyState == 4) {// 收到完整的服務(wù)器響應(yīng)           
            if (xmlhttp.status == 200) {//HTTP服務(wù)器響應(yīng)的值OK
      
           document.getElementById('message').innerHTML = xmlhttp.responseText;//將服務(wù)器返回的字符串寫到頁(yè)面中ID為message的區(qū)域           
            } else {               
            alert(xmlhttp.status);
            }       
            }   
            }
            </script>
    </head>
    <body>
    <input type="text" id="163id" />
    <input type="button" value="校驗(yàn)" onclick="IDRequest('check.php?userid=')" />
    <div id="message"></div>
    </body>
    </html>

    posted @ 2007-04-23 19:10 吳濤濤 閱讀(391) | 評(píng)論 (0)編輯 收藏

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "<html xmlns="<head>
    <meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
    <title>javascript生成上傳圖像預(yù)覽功能</title>
    </head>
    <body>
    <INPUT id=photo1 style="WIDTH: 350px"   onpropertychange="if(event.propertyName=='value') preview1.src=photo1.value.replace(/\\/g,'/')"
                type=file name=photo1>
    <br />
    <IMG id=preview1 height=66 src="圖片博客-上傳圖片_files/sampe3.jpg"
    width=66 name=preview1>
    </body>
    </html>

    posted @ 2007-04-23 19:09 吳濤濤 閱讀(441) | 評(píng)論 (0)編輯 收藏

    <?
    //utf-8->gb2312函數(shù),本程序沒有用到,僅供參考
    function u2utf82gb($c){
      $str="";
      if ($c < 0x80) {
          $str.=$c;
      } else if ($c < 0x800) {
          $str.=chr(0xC0 | $c>>6);
          $str.=chr(0x80 | $c & 0x3F);
      } else if ($c < 0x10000) {
          $str.=chr(0xE0 | $c>>12);
          $str.=chr(0x80 | $c>>6 & 0x3F);
          $str.=chr(0x80 | $c & 0x3F);
      } else if ($c < 0x200000) {
          $str.=chr(0xF0 | $c>>18);
          $str.=chr(0x80 | $c>>12 & 0x3F);
          $str.=chr(0x80 | $c>>6 & 0x3F);
          $str.=chr(0x80 | $c & 0x3F);
      }
      return iconv('UTF-8', 'GB2312', $str);
    }
    function unescape($str) {
    $str = rawurldecode($str);
    preg_match_all("/(?:%u.{4})|.{4};|&#\d+;|.+/U",$str,$r);
    $ar = $r[0];
    print_r($ar);
    foreach($ar as $k=>$v) {
      if(substr($v,0,2) == "%u")
        $ar[$k] = iconv("UCS-2","GB2312",pack("H4",substr($v,-4)));
      elseif(substr($v,0,3) == "")
        $ar[$k] = iconv("UCS-2","GB2312",pack("H4",substr($v,3,-1)));
      elseif(substr($v,0,2) == "&#") {
    echo substr($v,2,-1)."<br>";
        $ar[$k] = iconv("UCS-2","GB2312",pack("n",substr($v,2,-1)));
      }
    }
    return join(" ",$ar);
    }
    //下面是轉(zhuǎn)換功能
    $db = mysql_connect("localhost", "dbname", "password");
    mysql_select_db("dbname",$db);
    $result = mysql_query("SELECT * FROM dede_archives",$db);
    if ($result === false) die("failed");
    while ($fields = mysql_fetch_row($result)) {
            $con=$fields[10];
            $con = iconv("UTF-8","GB2312",$con);//主要是iconv函數(shù)的使用
            $update="update dede_archives set title='".$con."' where ID=".$fields[0];
            //echo $update;
            mysql_query($update);
            echo $fields[0]."OK"."<br />";
    }
    ?>

    posted @ 2007-04-16 19:38 吳濤濤 閱讀(1621) | 評(píng)論 (0)編輯 收藏

    主站蜘蛛池模板: 亚洲精品无码乱码成人| yy6080久久亚洲精品| 亚洲av永久无码制服河南实里| 一区二区三区免费视频网站| 亚洲精品国产va在线观看蜜芽| 另类小说亚洲色图| 亚洲黄片毛片在线观看| 成年网站免费入口在线观看| 亚洲片国产一区一级在线观看 | 免费国产综合视频在线看| 亚洲av无码专区在线观看亚| 免费一级毛片女人图片| 成人午夜影视全部免费看| 亚洲色无码一区二区三区| 免费人成激情视频在线观看冫| 亚洲一区二区三区夜色| 国产一卡二卡3卡四卡免费| 亚洲日本VA午夜在线电影| 男人的天堂亚洲一区二区三区 | 亚洲精品国产日韩| 四虎1515hm免费国产| 成人爽a毛片免费| 91亚洲va在线天线va天堂va国产| 久久久久久久免费视频| 亚洲av第一网站久章草| 国产亚洲精品成人AA片新蒲金| 一级毛片免费观看| 亚洲色大18成人网站WWW在线播放| 无码国产亚洲日韩国精品视频一区二区三区 | 亚洲大码熟女在线观看| 亚洲综合色成在线播放| 久久精品一本到99热免费| 亚洲字幕AV一区二区三区四区 | 久久久久亚洲精品美女| 成人免费午夜在线观看| 一级毛片视频免费观看| 18亚洲男同志videos网站| 国产精品无码一二区免费 | 亚洲成aⅴ人在线观看| 亚洲精品无码久久毛片| 五月婷婷在线免费观看|