Translate

2012年5月29日 星期二

各個瀏覽器 刪除cookie

比較常用的瀏覽器

IE: Ctrl+Shirt+Del ->  cookie 打勾 ->刪除

Google Chrome : Ctrl+Shirt+Del -> 刪除 Cookie、其他網站資料和外掛程式資料 打勾
->清除瀏覽資料

Firefox :Ctrl+Shirt+Del -> cookie 打勾 -> 確定

 p.s. 請開瀏覽器 再使用快捷鍵 Ctrl+Shirt+Del

2012年4月24日 星期二

任賢齊2012 K歌馬拉松


有生以來第一次聽這演唱會,坐在第一排

(這買票的過程~讓我超緊張的~訂購系統 真的真的~非常的不好用跟麻煩~只能用信用卡買票~沒信用卡的看來只能 乖乖去i-bon前面買了)
 演唱會一開始就被那喇叭聲把我嚇到了
超震撼的(我覺得我心臟好像暫時停止了兩秒鐘)
一看到很熟悉的偶像~第一次見到蘆山真面目
開頭聽又聽著熟悉的歌~眼淚就不自覺得流出來~真是默名的感動...
每唱一首歌前都要說一些話~然後都會用到以前的歌名~這應該有用心演練過

聽了一些舊歌~我好像坐了時光機 回到了 我國中時代
大半夜的~夜深人靜~伴這我k書的歌聲~
他唱的都是我唸書時 喜歡聽的....看來除非他不出唱片 不然我會繼續買下去罷

Magic Power幫小齊伴奏~說真的~對這樂團真的不是很熟悉

他的歌聲伴這我 經歷過太多第一次了...

聽完我有點耳鳴了 第一排音效太好了囧~ 最後還可以簽名跟握手~超厲害的~右手簽名+左手握手~超神速的 不到五秒鐘....真是值回票價....

此生應該沒機會坐那麼近看演唱會了~

附上那天有唱的歌~憑事後回想的 可能會有遺漏
不要變
浪花一朵朵
對折
心太軟
很受傷
不信邪
指揮家
我就是喜歡這樣
水晶
花好月圓
任逍遙
任性
傷心太平洋
依靠
愛的路上只有我和你
天使也一樣
再出發
我是一隻魚
對面的女孩看過來
舂天花會開
心肝寶貝
還有我
心情車站
溫柔
附上在網路上找到的演唱會片段~如果有侵權~請告知我~我會盡快拿掉
http://www.youtube.com/watch?v=OGxJt2C1r0Q&feature=related 
http://www.youtube.com/watch?v=Xn3bTOXdAz0&feature=related
http://www.youtube.com/watch?v=6AVzBF8vFag&feature=related

預祝小齊哥 年底小巨蛋演唱會也會大成功...
有機會我也會去參加的

2012年4月3日 星期二

javascript Limit the input digital 限制輸入數字

//-------------------------------------------------------code---------------------------------------------------------------
<input type="text" onkeypress="javascript:KeyPress(this);">
<script>
function KeyPress(objTR)
{                         
                var txtval=objTR.value;             
                var key = event.keyCode;

                if((key < 48||key > 57)&&key != 46)
                {              
                        event.keyCode = 0;
                }
                else
                {
                        if(key == 46)
                        {
                                if(txtval.indexOf(".") != -1||txtval.length == 0)
                                        event.keyCode = 0;
                        }
                }
}
</script>
 //-------------------------------------------------------code---------------------------------------------------------------
 but  Firebox  show   mesge error
 Firefox will show "var key = event.keyCode;" error ,Change another one

但是用火狐會顯示 "var key = event.keyCode;" 這行錯誤
 所以改另用一個方法

 //-------------------------------------------------------code---------------------------------------------------------------<input type="text" onkeyup="this.value=this.value.replace(/[^0-9]/g,'')" >
  //-------------------------------------------------------code---------------------------------------------------------------
 Direct use of regularization
直接使用正規化

2012年3月12日 星期一

javascript 計算字數範例(The number of calculations examples)

<html>
  <head>
  <meta http-equiv="content-type" content="text/html; charset=utf-8">
  <meta name="generator" content="PSPad editor, www.pspad.com">
  <title></title>
  </head>
  <body>
            <textarea name="text" cols="50" rows="10" onkeyup="Count_words(this);"></textarea>
                        Input: <span id="txt">0</span> Words       
                           
  </body>
</html>
<script>
function Count_words(objElement) //計算字數
{   
    var now_word = document.getElementById("txt");
    Count_num = objElement.value.length;
    now_word.innerHTML = Count_num;
}
</script>

2012年2月22日 星期三

php 過濾不要的字元或符號


範例

$str = "wow!h@e#l%l^o"; //需要過濾的字串

$del_char = array('~','!','@','#','%','^','wow');  //需要濾掉的字元

 foreach($del_char as $v)
    $str = str_replace($v,"",$str);
   echo $str;


2015/09/02

 因為效能關係 有發現了 新的寫法



   <?php
$trans = array( "hello" => "hi", "hi" => "hello");
echo 
strtr("hi all, I said hello", $trans);?>

輸出結果: hello all, I said hi

來源:http://php.net/manual/en/function.strtr.php

2012年2月16日 星期四

php 好用的function

implode (":", $array);                //陣列轉成字串

serialize($post_data)               //陣列轉成文字
unserialize($post_data)           //將轉成文字的陣列 轉回陣列

base64_encode($post_data) //base64加密
base64_decode($post_data) //base64解密

base64_encode(serialize($post_data)); //陣列轉成文字並用base64加密
unserialize(base64_decode($post_data))); //將base64解密並轉回陣列

substr($str,0,10);                  //截取字元
mb_substr($str,0,10,'utf8')   //解決截取中文字元會亂碼的問題
 



round()  四捨五入
ceil()   無條件進位
floor()  無條件捨去
php裏面轉換大小寫strtolower() , strtoupper()
mysql裏面轉換大小寫 ucase() , lcase()


2012年2月14日 星期二

用css方式秀出提示小視窗




<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
  <style type="text/css">
        <!--
        body {
        padding-left:50px;
        }
        a.show {
        color:block;
        text-decoration: underline;
        position:relative;}
        a.show span{
        display:none; }
        a.show:hover{
        cursor:hand;
        }
        a.show:hover .show_text{
        display: block;
        position:absolute;
        padding:10px;
        width:200px;
        height:30px;
        background:#000000;
        left:60px;
        top:30px;
        color:#FFFFFF;
        z-index:100;
        text-decoration: none;
        }
        -->
    </style>
  <meta http-equiv="content-type" content="text/html; charset=utf-8">
  <meta name="generator" content="PSPad editor, www.pspad.com">
  <title></title>
  </head>
  <body>

          <a href='' class='show'>點我看提式小視窗
                      <span class='show_text'>想秀出的訊息</span>
          </a>
  </body>
</html>