發表文章

目前顯示的是 9月, 2010的文章

【JavaScript】confirm 應用

<script type='text/javascript'> function send_crm(send_url) {  var chk_tag=confirm("是否確定要傳送?");  if (chk_tag==true)  {   location.href=send_url;   } } </script> 部分HTML碼: <input name="send" type="button" value="傳送" onClick=" send_crm('http://tw.yahoo.com') "> 本範例是確定要傳送,就會導到Yahoo首頁,這個動作可以自行更改

【CSS】呈現表格斜線

圖片
HTML 內定義 : 做為對角線的內容 <div class="out">   <b>科目</b>   <em>姓名</em> </div> CSS 內定義 .out{ border-top:40px #D6D3D6 solid; /*上邊框寬度等於表格第一行行高*/ width:0px; /*讓容器寬度為0*/ height:0px; /*讓容器高度為0*/ border-left:80px #BDBABD solid; /*左邊框寬度等於表格第一行第一格寬度*/ position:relative; /*讓裡面的兩個子容器絕對定位*/ } b{font-style:normal;display:block;position:absolute;top:-40px;left:-40px;width:35px;} em{font-style:normal;display:block;position:absolute;top:-25px;left:-70px;width:55x;} 完整範例: <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>用CSS呈現表格斜線</title> <style type="text/css"> *{padding:0;margin:0;} table{ border-collapse:collapse;border:1px #525152 solid;width:50%;margin:0 auto;margin-top:100px;} th,td{border:1px #525152 solid;text-align:center;font-size:12px;line-height:30px;background:#C6C7C6;} .t1_header{background:#D6D3D6;font-weight:bold;} /*表格斜線*/ .out{ border-top:4...

【心得與小品分享】常用諺語10句---(5)

1. Full of courtesy, full of craft.      禮多必詐 2. Facts speak louder than words.      事實勝於雄辯 3. Faith will move mountains.      天下無難事,只怕有心人 4. First come, first served.      捷足先登 5. First impressions are most lasting.      先入為主 6. Genius is one percent inspiration and ninety-nine percent perspiration .      天才是百分之ㄧ的靈感加上百分之九十九的努力 7. Great minds think alike.      英雄所見略同 8. Give him an inch and he’ll take an ell.      得寸進尺 9. God never shuts one door but he opens another.      天無絕人之路 10. Give me liberty, or give me death.      不自由,毋寧死

【JavaScript】CheckBox 全選與取消全選

圖片
<script language="JavaScript"> function chkall(input1,input2) {     var objForm = document.forms[input1];     var objLen = objForm.length;     for (var iCount = 0; iCount < objLen; iCount++)     {         if (input2.checked == true)         {             if (objForm.elements[iCount].type == "checkbox")             {                 objForm.elements[iCount].checked = true;             }         }         else         {             if (objForm.elements[iCount]...

【JavaScript】E-mail檢查

圖片
<script type='text/javascript'> function isMail () {     var str=document.form1. email_addr .value;     var str2=str.toLowerCase();     var testresults;     var filter=/^([\w-]+(?:\.[\w-]+)*)@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/i;         if (filter.test(str))     {         if (str.indexOf("@") < 0)           {             testresults=false;         }             if (str.indexOf(".") < 0)         {             testresults=false;         }                if (str....

【心得與小品分享】常用諺語10句---(4)

1. Don’t put off till tomorrow what you can do today.      今日事,今日畢 2. Don’t put all your eggs in one basket.      不要孤注一擲 3. Diseases enter by the mouth; misfortunes issue from it.      病從口入,禍從口出 4. Easy come, easy go.      來得易,去得也快 5. Easier said than done.      言易行難 6. Every cloud has a silver lining.      否極泰來 7. Everybody’s business is nobody’s business.      三個和尚沒水喝 8. Epochs test youths; youths create epochs.      時代考驗青年,青年創造時代 9. Failure teaches success.      失敗為成功之母 10. Fine clothes make the man.      佛靠金裝,人靠衣裝

【心得與小品分享】常用諺語10句---(3)

1. Burn the midnight oil.      三更燈火五更雞(勤勞到深夜) 2. Better late than never.    亡羊補牢,猶未為晚 3. Business is business.    公事公辦 4. Cut your coat according to your cloth.      量入為出 5. Constant dripping wears away the stone.      滴水穿石 6. Content is better than riches.      Happiness consists in contentment.      知足常樂 7. Do as you would be done by others.      己所不欲,勿施於人 8. Do well and have well.      善有善報 9. Diamond cut diamond.      勢均力敵 10. Don’t count your chickens before they are hatched.      不要妄想;勿過早樂觀

【ASP】計算中英文字數長度

圖片
<% Function LenMbcs(str)  strlencount=0  for ccc=1 to len(str)   if asc(mid(str, ccc, 1))<0 then    strlencount=strlencount + 2   else    strlencount=strlencount + 1   end if  next  LenMbcs=strlencount End Function if request("btn_act")="查詢" then  kk=request("txt_str")  bb=LenMbcs(kk) end if %> <html> <body> <form method="post">  <input type="text" name="txt_str" value="<%=kk%>">  <input type="submit" name="btn_act" value="查詢"> </form> 長度:<%=bb%> </body> </html> 解說 : 半形字 算一個字, 全形字及中文字 算二個字   EX 1 : 輸入 jason_123 EX 2 : 輸入 JASON (全型字) EX 3 : 輸入 你好嗎?

【心得與小品分享】常用諺語10句---(2)

1. Accidents will happen.      天有不測風雲,人有旦夕禍福 2. A young idler, an old beggar.      少壯不努力,老大徒傷悲 3. All good things must come to an end.      天下無不散的筵席 4. A little fire burns up a great deal of corn.      星星之火,可以燎原 5. As you sow, so shall you reap.      種瓜得瓜,種豆得豆 6. At home one depends on his parents; abroad, he needs the help of his friends.      在家靠父母,出外靠朋友 7. An eye for an eye; a tooth for a tooth      以眼還眼;以牙還牙 8. Beauty is only skin deep.      人不可貌相 9. Beggars can not be choosers.      飢不擇食 10. Beauty is in the eye of the beholder.       情人眼裡出西施

【心得與小品分享】常用諺語10句---(1)

1. All roads lead to Rome.      條條大路通羅馬 2. A friend in need is a friend indeed.      患難見真情 3. Actions speak louder than words.      事實勝於強辯 4. A miss is as good as a mile.      失之毫釐,謬之千里 5. A stitch in time saves nine.      及時行事,事半功倍 6. As a man makes his bed, so must he lie.      自作自受 7. A fall into a pit, a gain in your wit.      經一事,長一智 8. A crooked stick will have a crooked shadow.      上樑不正下樑歪 9. After a storm comes a calm.      雨過天晴;苦盡甘來 10. A fault confessed is half redressed.      知過能改,善莫大焉