好湿?好紧?好多水好爽自慰,久久久噜久噜久久综合,成人做爰A片免费看黄冈,机机对机机30分钟无遮挡

主頁 > 知識庫 > 用htc實現CHECKBOX控件

用htc實現CHECKBOX控件

熱門標簽:哈爾濱外呼系統代理商 南昌辦理400電話怎么安裝 鄭州智能外呼系統運營商 湛江電銷防封卡 獲客智能電銷機器人 徐州天音防封電銷卡 不錯的400電話辦理 電話機器人適用業務 佛山防封外呼系統收費
復制代碼 代碼如下:

/*
描述:        CHECKBOX控件
版本:        1.1
備注:        CHECKBOX控件背后跟隨的文字
            是獲取CHECKBOX對象的htc_myLabel來顯示的
            更新添加indeter屬性,用來增加不確定的選擇
*/
public:component>
public:attach event="oncontentready" onevent="fnInit()" />
public:attach event="onpropertychange" onevent="fnPropertychange()" />
script language="Javascript">
var checkBoxImg=window.document.createElement("IMG");
ImageArray=[];
ImageArray["checkbox_false"]="checkbox_false.gif";
ImageArray["checkbox_false_down"]="checkbox_false_down.gif";
ImageArray["checkbox_false_over"]="checkbox_false_over.gif";
ImageArray["checkbox_true"]="checkbox_true.gif";
ImageArray["checkbox_true_down"]="checkbox_true_down.gif";
ImageArray["checkbox_true_over"]="checkbox_true_over.gif";
ImageArray["checkbox_indeter"]="checkbox_indeter.gif";
ImageArray["checkbox_indeter_down"]="checkbox_indeter_down.gif";
ImageArray["checkbox_indeter_over"]="checkbox_indeter_over.gif";
function preLoad(path,obj){
    for(i in obj){
        this[i]=new Image();
        this[i].src=path+obj[i];
        }
    return this;
    }
preb=new preLoad("images/",ImageArray);
function fnInit(){
    var o=element;
    if(o.type=="checkbox"){
        var _table=window.document.createElement("TABLE");
        _table.cellSpacing="0px";
        _table.cellPadding="0px";
        _table.border="0px";
        if(o.disabled){
            _table.style.filter="alpha(Opacity=50)";
            }
        else{
            _table.style.filter="";
            }
        _table.style.display="inline";
        var _tr=_table.insertRow();
        var _td=_tr.insertCell();
        if (o.checked){
            checkBoxImg.src=preb["checkbox_true"].src;
            }
        else{
            checkBoxImg.src=preb["checkbox_false"].src;
            }
        if(o.indeter=="true"){
            o.indeterminate="true";
            checkBoxImg.src=preb["checkbox_indeter"].src;
            }
        _td.appendChild(checkBoxImg);
        _td=_tr.insertCell();
        _td.style.verticalAlign="bottom";
        if(o.htc_myLabel){
            _td.innerHTML="nbsplabel style='cursor: hand'>"+o.htc_myLabel+"/label>";
            }
        o.insertAdjacentElement("afterEnd",_table);
        o.style.display="none";
        _table.attachEvent("onmouseover",function(){Baction("over")});
        _table.attachEvent("onmouseout",function(){Baction("out")});
        _table.attachEvent("onmousedown",function(){Baction("down")});
        _table.attachEvent("onmouseup",function(){Baction("up")});
        _table.attachEvent("onclick",function(){fnClick()});
        }
    }
function fnPropertychange(){
    var o=element;
    switch(event.propertyName.toString().toLowerCase()){
        case "checked":
            Baction("up");
            break;
        }
    }
function fnClick(){
    var o=element;
    if(o.type=="checkbox"){
        if(o.disabled)return;
        if(o.checked){
            checkBoxImg.src=preb["checkbox_false"].src;
            }
        else{
            checkBoxImg.src=preb["checkbox_true"].src;
            }

        o.checked=!o.checked;
        }
    }
function Baction(action){
    var o=element;
    if(o.type=="checkbox"){
        if(o.disabled)return;
        if(action=="up"||action=="over"){
            if(o.indeterminate){
                checkBoxImg.src=preb["checkbox_indeter_over"].src;
                }
            else if(o.checked){
                checkBoxImg.src=preb["checkbox_true_over"].src;
                }
            else{
                checkBoxImg.src=preb["checkbox_false_over"].src;
                }
            }
        if(action=="out"){
            if(o.indeterminate){
                checkBoxImg.src=preb["checkbox_indeter"].src;
                }
            else if(o.checked){
                checkBoxImg.src=preb["checkbox_true"].src;
                }
            else{
                checkBoxImg.src=preb["checkbox_false"].src;
                }

            }
        if(action=="down"){
            if(o.indeterminate){
                checkBoxImg.src=preb["checkbox_indeter_down"].src;
                }
            else if(o.checked){
                checkBoxImg.src=preb["checkbox_true_down"].src;
                }
            else{
                checkBoxImg.src=preb["checkbox_false_down"].src;
                }
            o.indeterminate=false;
            }
        }
    }
/script>
/public:component>

測試例子:
復制代碼 代碼如下:

html>
head>
title> 新文檔 /title>
meta name="Generator" content="EditPlus">
meta name="Author" content="FlashSoft">
meta name="Keywords" content="">
meta name="Description" content="FlashSoft">
meta http-equiv="Content-Type" content="text/html; charset=utf-8">
style type="Text/Css">

input.checkbox{
    behavior:url("behaviors/checkbox.htc");cursor: hand;
    }

/style>
/head>
body>
input name="chk1" type="checkbox" class="checkbox" htc_myLabel="音樂" checked>
input name="chk1" type="checkbox" class="checkbox" htc_myLabel="體育" disabled>
input name="chk1" type="checkbox" class="checkbox" htc_myLabel="新聞">
input name="chk1" type="checkbox" class="checkbox" htc_myLabel="不確定屬性1" indeter="true" checked>
input name="chk1" type="checkbox" class="checkbox" htc_myLabel="不確定屬性2" indeter="true" disabled>
input name="chk1" type="checkbox" class="checkbox" htc_myLabel="不確定屬性3" indeter="true">
/body>
/html>

下載此文件
您可能感興趣的文章:
  • Asp.net Mvc 身份驗證、異常處理、權限驗證(攔截器)實現代碼
  • asp.net中3種驗證碼示例(實現代碼)(數字,數字字母混和,漢字)
  • 驗證用戶必選CheckBox控件與自定義驗證javascript代碼

標簽:紹興 蕪湖 廣西 懷化 呂梁 安康 蘭州 吉安

巨人網絡通訊聲明:本文標題《用htc實現CHECKBOX控件》,本文關鍵詞  用,htc,實現,CHECKBOX,控件,;如發現本文內容存在版權問題,煩請提供相關信息告之我們,我們將及時溝通與處理。本站內容系統采集于網絡,涉及言論、版權與本站無關。
  • 相關文章
  • 下面列出與本文章《用htc實現CHECKBOX控件》相關的同類信息!
  • 本頁收集關于用htc實現CHECKBOX控件的相關信息資訊供網民參考!
  • 推薦文章
    主站蜘蛛池模板: 欧美精品一区二区三区视频| 日韩欧美国产亚洲制服| 男生扒开美女尿口戳戳| 又粗又硬女人免费视频| 金瓶悔扬思敏版在线观看| 真人做人爱边吃奶视频免费| 91精品国产综合久久MMD| 黄色免费网站下载| 偷窥老公出轨绿出轨短篇合集| 1204金沙人妻懂旧版免费| 女教师~婬辱的教室高清在线| 久久久久久久久久久国产一区二区三区 | 国产影片小桃酱在线观看| 又粗又长又硬又大又爽| JIZZJIZZ日本高潮喷水| 午夜做受视频试看6次| 黄色网址是多少| 欧美日韩成人午夜免费| 免费无码又爽又刺激A片暗夜| 荡女欲妇有声小说mp3| 张开腿让我插| 美国A级毛片免费视频| 好爽好硬好难受再深一点视频| freesex欧美喷水| 99久久婷婷国内精品2020| 91婷婷综合一区二区三区久久 | 啊好大好深| 欧美成人手机视频免费播放| 在线观看a级片| 亚洲福利电影一区二区?| 好紧我太爽了再快点喷水了| xxxx按摩| 女人把扒开给男人爽的| 亚洲视频精品在线| 美妇后菊| 伊人第一路线| 我见探花多娇媚| 高中暑假调教篇| 欧美日韩综合视频一区二区三区 | 色戒未删减完整版1080p| 免费看网站在线观看人数在哪直播|