IE bug – Colspan Bug in IE

August 28th, 2010

<table border=”1″ width=”100%”>
<tr>
<th align=”center” width=”1″><input type=”checkbox” value=”2″ /></th>
<th>Name 1</th>
<th>Name 2</th>
<th>Name 3</th>
</tr>
<tr>
<td colspan=”4″>
<input type=”button” name=”it is button 1″ value=”it is button Submit 1″ />
<input type=”button” name=”it is button 2″ value=”it is button Submit 2″ />
</td>
</tr>
</table>

My Solution :

<table border=”1″ width=”100%”>
<tr>
<th align=”center” width=”1″><input type=”checkbox” value=”2″ /></th>
<th>Name 1</th>
<th>Name 2</th>
<th>Name 3</th>
</tr>
<tr>
<td colspan=”4″ style=”width:auto;”>
<input type=”button” name=”it is button 1″ value=”it is button Submit 1″ />
<input type=”button” name=”it is button 2″ value=”it is button Submit 2″ />
</td>
</tr>
</table>

CSS, HTML

PHP – 查這個function在那裡使用

August 28th, 2010

查這個function a 那裡會被使用

function a(){

echo ‘<pre>’;

print_r(debug_backtrace(true));

echo ‘</pre>’;

}

PHP , ,

HTML disable input text history

August 7th, 2010

主要防止一些javascript執行(onchange, onclick)的時候,沒有回應
<input type=”text” autocomplete off />
這樣就能取消text box history

HTML , ,

How to get the current epoch time in …

June 22nd, 2010

Perl time
PHP time()
Ruby Time.now (or Time.new). To display the epoch: Time.now.to_i
Python import time first, then time.time()
Java long epoch = System.currentTimeMillis()/1000;
Microsoft .NET C# epoch = (DateTime.Now.ToUniversalTime().Ticks - 621355968000000000) / 10000000;
VBScript/ASP DateDiff("s", "01/01/1970 00:00:00", Now())
Erlang calendar:datetime_to_gregorian_seconds(calendar:now_to_universal_time( now()))-719528*24*3600.
MySQL SELECT unix_timestamp(now()) More information
PostgreSQL SELECT extract(epoch FROM now());
Oracle PL/SQL SELECT (SYSDATE - TO_DATE('01-01-1970 00:00:00', 'DD-MM-YYYY HH24:MI:SS')) *
24 * 60 * 60 FROM DUAL
SQL Server SELECT DATEDIFF(s, '1970-01-01 00:00:00', GETUTCDATE())
JavaScript Math.round(new Date().getTime()/1000.0) getTime() returns time in milliseconds.
Unix/Linux date +%s
Other OS’s Command line: perl -e "print time" (If Perl is installed on your system)

Program , , , , , , , , , , , , , , , ,