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

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

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

    posts - 22,comments - 35,trackbacks - 0

    /*

    IsEnLetter(string,string): 測試字符串,大小寫 (UL,U,L or ul,u,l)

    */

    function IsEnLetter(objStr,size)

    {

    ??? var reg;

    ???

    ??? if(Trim(objStr)=="")

    ??? {

    ??????? return false;

    ??? }

    ??? else

    ??? {

    ??????? objStr=objStr.toString();

    ??? }???

    ???

    ??? if((size==null)||(Trim(size)==""))

    ??? {

    ??????? size="UL";

    ??? }

    ??? else

    ??? {

    ??????? size=size.toUpperCase();

    ??? }

    ???

    ??? switch(size)

    ??? {

    ??????? case "UL":

    ??????????? // 大小寫

    ??????????? reg=/^[A-Za-z]+$/;

    ??????????? break;

    ??????? case "U":

    ??????????? // 大寫

    ??????????? reg=/^[A-Z]+$/;

    ??????????? break;

    ??????? case "L":

    ??????????? // 小寫

    ??????????? reg=/^[a-z]+$/;

    ??????????? break;

    ??????? default:

    ????? ??????alert(" 檢查大小寫參數,只可為 ( 空、 UL U L)");

    ??????????? return false;

    ??????????? break;

    ??? }

    ???

    ??? var r=objStr.match(reg);

    ??? if(r==null)

    ??? {

    ??????? return false;

    ??? }

    ??? else

    ??? {???????

    ??????? return true;????

    ??? }

    }

    ?

    ?

    /*

    ================================================================================

    功能:鼠標小提示

    作者:申旺

    日期: 2004/04/15

    ================================================================================

    */

    ?

    // 定義變量、設置默認值

    var LabelFontFace=" 宋體 ,arial,Verdana";

    var LabelFontColor="#000000";

    var LabelFontSize="9pt";

    var LabelFontStyle="Font.PLAIN";

    var LabelBorderColor="#000000";

    var LabelBackColor="#FFFFE1";

    ?

    // 設置各個屬性

    function SetLabelFontFace(obj)

    {

    ?????? obj=Trim(obj);

    ?????? if(obj==null || obj=="")

    ?????? {

    ????????????? obj=" 宋體 ,arial,Verdana";

    ?????? }

    ?????? LabelFontFace=obj;

    }

    ?

    function SetLabelFontColor(obj)

    {

    ??? obj=Trim(obj);

    ?????? if(obj==null || obj=="")

    ?????? {

    ????????????? obj="#000000";

    ?????? }

    ?????? LabelFontColor=obj;

    }

    ?

    function SetLabelFontSize(obj)

    {

    ??? obj=Trim(obj);

    ?????? if(obj==null || obj=="")

    ?????? {

    ????????????? obj="9pt";

    ?????? }

    ?????? LabelFontSize=obj;

    }

    ?

    function SetLabelFontStyle(obj)

    {

    ??? obj=Trim(obj);

    ?????? if(obj==null || obj=="")

    ?????? {

    ????????????? obj="Font.PLAIN";

    ?????? }

    ?????? LabelFontStyle=obj;

    }

    ?

    function SetLabelBorderColor(obj)

    {

    ??? obj=Trim(obj);

    ??? if(obj==null || obj=="")

    ??? {

    ??????? obj="#000000";

    ??? }

    ??? LabelBorderColor=obj;

    }

    ?

    function SetLabelBackColor(obj)

    {

    ??? obj=Trim(obj);

    ??? if(obj==null || obj=="")

    ??? {

    ??????? obj="#FFFFE1";

    ??? }

    ??? LabelBackColor=obj;

    }

    ?

    // 合成文字樣式

    function SetTextStyle(str)

    {

    ??? var strRet="";

    ???

    ??? var strStyle="";

    ???

    ??? strStyle="font-family:"+LabelFontFace+";";

    ??? strStyle+="color:"+LabelFontColor+";";

    ??? strStyle+="font-size:"+LabelFontSize+";";

    ???

    ??? switch(LabelFontStyle.toLowerCase())

    ??? {

    ??????? case "font.plain":

    ??????????? strStyle+="font-weight: normal;";

    ???? ???????strStyle+="font-style: normal;";

    ??????????? break;

    ??????? case "font.bold":

    ??????????? strStyle+="font-weight: bold;";

    ??????????? strStyle+="font-style: normal;";

    ??????????? break;

    ??????? case "font.italic":

    ??????????? strStyle+="font-weight: normal;";

    ??????????? strStyle+="font-style: italic;";

    ??????????? break;

    ??????? case "font.italicbold":

    ??????? case "font.bolditalic":

    ??????????? strStyle+="font-weight: bold;";

    ??????????? strStyle+="font-style: italic;";

    ??????????? break;

    ??????? default:

    ??????????? strStyle+="font-weight: bold;";

    ??????????? strStyle+="font-style: italic;";

    ??????????? break;

    ??? }

    ???

    ??? strRet="<font style='"+strStyle+"'>";

    ??? strRet+="&nbsp;"+str+"&nbsp;";

    ??? strRet+="</font>";

    ???

    ??? return strRet;

    }

    ?

    // 合成表格樣式

    function SetTableStyle()

    {

    ??? var strRet="";

    ???

    ??? strRet+="border-right: "+LabelBorderColor+" 1px solid;";

    ??? strRet+="border-top: "+LabelBorderColor+" 1px solid;";

    ??? strRet+="border-left: "+LabelBorderColor+" 1px solid;";

    ??? strRet+="border-bottom: "+LabelBorderColor+" 1px solid;";

    ??? strRet+="background-color:"+LabelBackColor;???

    ???

    ??? return strRet;

    }

    ?

    // 顯示提示

    function ShowNote(str)

    {

    ?????? var strHtml;

    ??????

    ?????? strHtml="";

    ?????? strHtml+="<table height=1px width=1px border='0'cellspacing='0' cellpadding='0' style='" + SetTableStyle() + "'>";

    ?????? strHtml+="<tr>";

    ?????? strHtml+="<td>"+SetTextStyle(str)+"</td>";

    ?????? strHtml+="</tr>";

    ?????? strHtml+="</table>";??????????????????????????

    ??????

    ?????? if (document.all&&document.readyState=="complete")

    ?????? {???????????????????????????????????????

    ????????????? document.all.div_Note.innerHTML=strHtml;

    ????????????? document.all.div_Note.style.pixelLeft=event.clientX+document.body.scrollLeft+10

    ????????????? document.all.div_Note.style.pixelTop=event.clientY+document.body.scrollTop+10

    ????????????? document.all.div_Note.style.visibility="visible"

    ?????? }????

    }

    ?

    // 隱藏提示

    function HideNote()

    {

    ?????? if (document.all)

    ?????? {

    ????????????? document.all.div_Note.style.visibility="hidden";

    ?????? }

    ?????? else

    ?????? {

    ????????????? if (document.layers)

    ????????????? {

    ???????????????????? clearInterval(currentscroll)

    ???????????????????? document.div_Note.visibility="hidden";

    ????????????? }

    ?????? }????????????????????????????????

    }

    ?

    // 初始化

    function Init()

    {

    ??? window.document.write("<div id=\"div_Note\" style=\"VISIBILITY:hidden; POSITION:absolute; HEIGHT:13px;z-index:1\"></div>");

    }

    Init();

    ?

    // 生成提示字符

    function ShowLabel(text,note,bclick)

    {

    ?????? if(bclick!=null)

    ?????? {

    ????????????? return "<a href=\"#\" onMouseOver=\"ShowNote('" + note + "')\" onMouseOut=\"HideNote()\" onClick=\"JavaScript:DoSomeThing(this);\">" + text + "</a>";

    ?????? }

    ?????? else

    ?????? {

    ?????? ??? return "<a href=\"#\" onMouseOver=\"ShowNote('" + note + "')\" onMouseOut=\"HideNote()\">" + text + "</a>";

    ?????? }

    }

    ?

    ?

    ?

    測試頁面:

    <HTML>

    ??? <HEAD>

    ??????? <title>Common JavaScript</title>

    ????????????? <script language="javascript" src="./Common.js"></script>

    ??????? <script language="javascript">?????

    ???????????????????? function CheckInt()

    ???????????????????? {

    ??????????????????????????? iptResult.value=IsInt(iptTest.value,iptSign.value,iptZero.value);

    ???????????????????? }

    ????????????????????

    ???????????????????? function CheckFloat()

    ???????????????????? {

    ??????????????????????????? iptResult.value=IsFloat(iptTest.value,iptSign.value,iptZero.value);

    ???????????????????? }

    ????????????????????

    ???????????????????? function CheckLetter()

    ???????????????????? {

    ??????????????????????????? iptResult.value=IsEnLetter(iptTest.value,iptSign.value);

    ???????????????????? }

    ???????????????????? document.write(ShowLabel("TEST","Only a testing!"));

    ???????????????????? document.write("<br>");

    ????????????? </script>

    ??????? <meta http-equiv="expires" content="0">???????

    ??? </HEAD>

    ??? <body>???

    ???? <input type=text value="" id="iptTest"><input type=button value="IsEmpty" onclick="IsEmpty('iptTest');">

    ???? <input type=button value="CheckInt" onclick="CheckInt()">

    ?????? ?<br>

    ???? <input type=text value="" id="iptSign" NAME="iptSign"><input type=button value="CheckFloat" onclick="CheckFloat()">

    ?????? ?<br>

    ???? <input type=text value="" id="iptZero" NAME="iptZero"><input type=button value="CheckLetter" onclick="CheckLetter()">????

    ???? <br>

    ???? <input type=text value="" id=iptResult disabled=true>

    ??? </body>

    </HTML>

    posted on 2006-06-30 10:39 kelven 閱讀(146) 評論(0)  編輯  收藏 所屬分類: JavaScript
    主站蜘蛛池模板: 99精品一区二区免费视频| 五月天婷婷精品免费视频| 免费国产成人α片| 亚洲人成人无码网www国产| 自拍偷自拍亚洲精品播放| 精品国产免费一区二区| 亚洲码欧美码一区二区三区| 岛国片在线免费观看| 亚洲色大成网站www永久网站| 成全高清视频免费观看| 亚洲另类自拍丝袜第五页| 国产精品免费_区二区三区观看| 亚洲成熟丰满熟妇高潮XXXXX| 吃奶摸下高潮60分钟免费视频| 日本高清不卡中文字幕免费| 国产亚洲大尺度无码无码专线 | www.亚洲日本| 免费看的黄色大片| 日韩精品视频在线观看免费| 中文字幕亚洲日本岛国片| 国产在线精品免费aaa片| 久久亚洲精品无码AV红樱桃| 大地资源二在线观看免费高清| 大桥未久亚洲无av码在线 | 国产成人免费一区二区三区| 狼色精品人妻在线视频免费| 亚洲热线99精品视频| 在线美女免费观看网站h| 亚洲国产精华液2020| 亚洲熟伦熟女新五十路熟妇| 免费黄网站在线看| 日韩亚洲不卡在线视频中文字幕在线观看| 日韩免费视频一区| 久久免费线看线看| 天天爽亚洲中文字幕| 亚洲精品无码av天堂| 日韩在线播放全免费| 男女男精品网站免费观看| 亚洲色图综合网站| 免费在线观看中文字幕| 亚洲高清视频免费|