公告版位
本站圖文皆屬個人創作,非經本人同意授權;請勿盜用…

text.attr("disabled",true);

text.attr("disabled",false);


Posted by 歐迪 at 痞客邦 PIXNET 留言(0) 引用(0) 人氣()

第一種方法

$("#id").css('display','none'); 

$("#id").css('display','block'); 

第二種

$("#id")[0].style.display = 'none'; 

第三種

Posted by 歐迪 at 痞客邦 PIXNET 留言(0) 引用(0) 人氣()

$('#mySelect')
.find('option')//找到option的元素
.remove()//刪除
.end()//結束
.append('<option value="whatever">text</option>')//新增一個元素
.val('whatever')//設定選取此元素
;

Posted by 歐迪 at 痞客邦 PIXNET 留言(0) 引用(0) 人氣()

select 

now()=>2012-05-21 15:31:49

CURDATE()=>2012-05-21


Posted by 歐迪 at 痞客邦 PIXNET 留言(0) 引用(0) 人氣()

一般設定: opacity:0.8;

IE系列:filter:alpha(opacity=80);


Posted by 歐迪 at 痞客邦 PIXNET 留言(0) 引用(0) 人氣()

$(document).bind("contextmenu",function(event){
return false;
});


Posted by 歐迪 at 痞客邦 PIXNET 留言(0) 引用(0) 人氣()

//------------建立名叫temp_test的temptable 然後給值 來源是table1

$set_table='CREATE TEMPORARY TABLE `temp_test` ENGINE = MYISAM
SELECT a, b, c, d, e FROM `table1`';
//------------------------------------------------------------
mysql_query($set_table) or die(mysql_error().$set_table);
//--------------------------------寫入另一個表格資料
$set_table2='insert into `temp_test` SELECTa, b, c, d, e FROM `table2`';

mysql_query($set_table2) or die(mysql_error().$set_table2);


Posted by 歐迪 at 痞客邦 PIXNET 留言(0) 引用(0) 人氣()

這通常是不經意的小錯誤

ex:你有載入其它js檔裡面有用到$()等相關語法,但你在主頁的時候
<script type="text/javascript" src="../js/xxx.js"></script><=這裡就會跳出error msg 因為裡面有用到$

<script type="text/javascript" src="http://www.google.com/jsapi"></script><=這兩段應該放在最上面
<script type="text/javascript">google.load("jquery","1");</script>

 


Posted by 歐迪 at 痞客邦 PIXNET 留言(0) 引用(0) 人氣()

<input   onkeydown= "if(event.keyCode==8)   return   false ">


Posted by 歐迪 at 痞客邦 PIXNET 留言(0) 引用(0) 人氣()

<?php
if(isset($_GET['f'])){
$str=urldecode($_GET['f']);//解碼

$filename=substr($str,strrpos($str,'/')+1,strlen($str)-strrpos($str,'/'));//取出檔案名稱

$file="../xxx/".$filename;//檔案相對路徑

//指定類型

Posted by 歐迪 at 痞客邦 PIXNET 留言(0) 引用(0) 人氣()