HOME 首頁(yè)
SERVICE 服務(wù)產(chǎn)品
XINMEITI 新媒體代運(yùn)營(yíng)
CASE 服務(wù)案例
NEWS 熱點(diǎn)資訊
ABOUT 關(guān)于我們
CONTACT 聯(lián)系我們
創(chuàng)意嶺
讓品牌有溫度、有情感
專(zhuān)注品牌策劃15年

    百度點(diǎn)擊下拉事件的代碼(百度移動(dòng)端下拉詞技術(shù))

    發(fā)布時(shí)間:2023-04-08 07:05:36     稿源: 創(chuàng)意嶺    閱讀: 56        

    大家好!今天讓創(chuàng)意嶺的小編來(lái)大家介紹下關(guān)于百度點(diǎn)擊下拉事件的代碼的問(wèn)題,以下是小編對(duì)此問(wèn)題的歸納整理,讓我們一起來(lái)看看吧。

    開(kāi)始之前先推薦一個(gè)非常厲害的Ai人工智能工具,一鍵生成原創(chuàng)文章、方案、文案、工作計(jì)劃、工作報(bào)告、論文、代碼、作文、做題和對(duì)話(huà)答疑等等

    只需要輸入關(guān)鍵詞,就能返回你想要的內(nèi)容,越精準(zhǔn),寫(xiě)出的就越詳細(xì),有微信小程序端、在線(xiàn)網(wǎng)頁(yè)版、PC客戶(hù)端

    官網(wǎng):https://ai.de1919.com。

    創(chuàng)意嶺作為行業(yè)內(nèi)優(yōu)秀的企業(yè),服務(wù)客戶(hù)遍布全球各地,如需了解SEO相關(guān)業(yè)務(wù)請(qǐng)撥打電話(huà)175-8598-2043,或添加微信:1454722008

    本文目錄:

    百度點(diǎn)擊下拉事件的代碼(百度移動(dòng)端下拉詞技術(shù))

    一、提問(wèn):怎樣實(shí)現(xiàn)點(diǎn)擊一個(gè)按鈕彈出下拉列表

    用css把按鈕弄成下列表的樣式,用一個(gè)事件,按下時(shí),調(diào)用一個(gè)顯示div的樣式,div里面,是一個(gè)真正的下拉框。。。div彈出時(shí)設(shè)置位置時(shí),蓋住按鈕即可。

    二、html 鏈接點(diǎn)擊一下顯示下拉內(nèi)容(再點(diǎn)擊一下自動(dòng)收回),上一次點(diǎn)擊內(nèi)容自動(dòng)收回,代碼怎么寫(xiě)?謝謝!

    在isHidden函數(shù)中添加如下代碼即可:

    function isHidden(oDiv){

    var vDiv = document.getElementById(oDiv);

    vDiv.style.display = (vDiv.style.display == 'none')?'block':'none';

    // add code

    var allDiv = document.getElementsByTagName('div');

    for (var i=0; i<allDiv.length; i++) {

    if (vDiv != allDiv[i]) {

    allDiv[i].style.display = 'none';

    }

    }

    }

    三、網(wǎng)站搜索框下拉菜單代碼

    我不知道具體的代碼。但我覺(jué)得那個(gè)不是程序里的代碼做的。應(yīng)該是綁定數(shù)據(jù)庫(kù)的時(shí)候通過(guò)Sql語(yǔ)句的模糊查詢(xún)做到的。。。。

    例如:

    "select * from table where name like ' % " + textbox1.Text + " % ' "

    上面這段語(yǔ)句的用處就是在數(shù)據(jù)庫(kù)里查找name字段中含有textbox1.Text內(nèi)容的數(shù)據(jù)。

    經(jīng)測(cè)試(可以查到中文,英文,數(shù)字)不論是首字符或在字符串中間結(jié)尾都可以查到。

    但做不到像BAIDU那樣輸入pinyin字母就搜到對(duì)應(yīng)的中文查詢(xún)結(jié)果。

    四、網(wǎng)頁(yè)設(shè)計(jì)關(guān)于下拉列表的代碼

    看看這個(gè)不錯(cuò):

    <html>

    <head>

    <meta http-equiv="Content-Type" content="text/html; charset=gb2312" />

    <title>Untitled Document</title>

    <script language="JavaScript" type="text/javascript">

    //---------------------------------------------------------------------------

    // 功能搜索選擇框

    // 作者:Joshua

    // 創(chuàng)建時(shí)間:2007-02-07

    // Email:JoshuaChen[at]126.com

    // webSite:www.xcopy.cn

    //---------------------------------------------------------------------------

    //省

    var Data_Area_Province = new Array("安徽","北京","福建","甘肅","廣東","廣西","貴州","海南","河北","河南","黑龍江","湖北","湖南","吉林","江蘇","江西","遼寧","內(nèi)蒙古","寧夏","青海","山東","山西","陜西","上海","四川","天津","西藏","新疆","云南","浙江","重慶");

    //市區(qū)

    var Data_Area_City = new Array();

    Data_Area_City[0] = new Array("安慶","蚌埠","馬鞍山","宿州","銅陵","蕪湖","宣城","亳州");

    Data_Area_City[1] = new Array("北京");

    Data_Area_City[2] = new Array("福州","龍巖","南平","寧德","莆田","泉州","三明","廈門(mén)","漳州");

    Data_Area_City[3] = new Array("白銀","定西","天水","武威","張掖");

    Data_Area_City[4] = new Array("潮州","東莞","佛山","廣州","肇慶","中山","珠海");

    Data_Area_City[5] = new Array("百色","北海","崇左","防城港","桂林","貴港","河池","賀州","來(lái)賓","柳州","南寧","欽州","梧州","玉林");

    Data_Area_City[6] = new Array("安順","畢節(jié)","貴陽(yáng)","六盤(pán)水","銅仁","遵義");

    Data_Area_City[7] = new Array("白沙黎族自治縣","樂(lè)東黎族自治縣","萬(wàn)寧","文昌","五指山","儋州");

    Data_Area_City[8] = new Array("保定","滄州","承德","邯鄲","衡水","廊坊","秦皇島","石家莊","唐山","邢臺(tái)","張家口");

    Data_Area_City[9] = new Array("安陽(yáng)","鶴壁","濟(jì)源","焦作","開(kāi)封","洛陽(yáng)","周口","駐馬店","漯河","濮陽(yáng)");

    Data_Area_City[10]= new Array("大慶","大興安嶺","哈爾濱","鶴崗","七臺(tái)河","齊齊哈爾","雙鴨山","綏化","伊春");

    Data_Area_City[11] = new Array("鄂州","恩施土家族苗族自治州","黃岡","襄樊","孝感","宜昌");

    Data_Area_City[12] = new Array("常德","長(zhǎng)沙","岳陽(yáng)","張家界","株洲");

    Data_Area_City[13] = new Array("白城","白山","長(zhǎng)春","吉林","遼源","四平","松原","通化","延邊朝鮮族自治州");

    Data_Area_City[14] = new Array("常州","淮安","連云港","南京","南通","蘇州","宿遷","泰州","無(wú)錫","徐州","鹽城","揚(yáng)州","鎮(zhèn)江");

    Data_Area_City[15] = new Array("撫州","贛州","吉安","景德鎮(zhèn)","九江","南昌","萍鄉(xiāng)","上饒","新余","宜春","鷹潭");

    Data_Area_City[16] = new Array("鞍山","本溪","朝陽(yáng)","沈陽(yáng)","鐵嶺","營(yíng)口");

    Data_Area_City[17] = new Array("阿拉善盟","巴彥淖爾盟","包頭","錫林郭勒盟","興安盟");

    Data_Area_City[18] = new Array("固原","石嘴山","吳忠","銀川");

    Data_Area_City[19] = new Array("果洛藏族自治州","西寧","玉樹(shù)藏族自治州");

    Data_Area_City[20] = new Array("濱州","德州","東營(yíng)","菏澤","濰坊","煙臺(tái)","棗莊","淄博");

    Data_Area_City[21] = new Array("長(zhǎng)治","大同","晉城","晉中","臨汾","呂梁","朔州","太原","忻州","陽(yáng)泉","運(yùn)城");

    Data_Area_City[22] = new Array("安康","寶雞","漢中","商洛","銅川","渭南","西安","咸陽(yáng)","延安","榆林");

    Data_Area_City[23] = new Array("上海");

    Data_Area_City[24] = new Array("阿壩藏族羌族自治州","綿陽(yáng)","南充","內(nèi)江","攀枝花","遂寧","雅安","宜賓","資陽(yáng)","自貢","瀘州");

    Data_Area_City[25] = new Array("天津");

    Data_Area_City[26] = new Array("阿里","昌都","拉薩","林芝","那曲","日喀則","山南");

    Data_Area_City[27] = new Array("阿克蘇","和田","喀什","吐魯番","烏魯木齊","五家渠","伊犁哈薩克自治州");

    Data_Area_City[28] = new Array("保山","玉溪","昭通");

    Data_Area_City[29] = new Array("杭州","湖州","嘉興","金華","麗水","寧波","紹興","臺(tái)州","溫州","舟山","衢州");

    Data_Area_City[30] = new Array("重慶");

    //學(xué)歷

    var Data_School = new Array("初中","高中","中專(zhuān)","大專(zhuān)","本科","雙學(xué)位");

    //行業(yè)

    var Data_Industry = new Array("計(jì)算機(jī)類(lèi)","金融/證券/保險(xiǎn)類(lèi)","財(cái)務(wù)類(lèi)","工業(yè)/工廠(chǎng)類(lèi) ","技工類(lèi)","機(jī)械/設(shè)備維修類(lèi)","動(dòng)力電氣類(lèi)", "輕工類(lèi) ","美容保健類(lèi)");

    //時(shí)間

    var Data_Date = new Array("今天","三天內(nèi)","一個(gè)星期內(nèi)","半個(gè)月內(nèi)","一個(gè)月內(nèi)","三個(gè)月內(nèi)","半年內(nèi)","一年內(nèi)","所有");

    //層狀態(tài)

    var Date_DivState=new Array()

    //鼠標(biāo)焦點(diǎn)狀態(tài)

    var focusState=false

    var Search = new Object();

    //--------------------------------------

    // 初始化Div標(biāo)簽事件

    // Joshua 2007-02-07

    //--------------------------------------

    Search.Init = function(){

    document.getElementById("Data_Area").onclick = Search.ShowArea.Init;

    document.getElementById("Data_School").onclick = Search.ShowSchool;

    document.getElementById("Data_Industry").onclick = Search.ShowIndustry;

    document.getElementById("Data_Date").onclick = Search.ShowDate;

    }

    //-------------------------------

    // 創(chuàng)建一個(gè)Div對(duì)象

    // Joshua 2007-02-07

    //-------------------------------

    Search.CreateDiv = function(obj,Id,X,Y,oWidth,oHeight){

    var Obj_Div = document.createElement("div");

    Obj_Div.setAttribute("id",Id);

    Obj_Div.style.position="absolute";

    Obj_Div.style.background="#fff";

    Obj_Div.style.zIndex = "10000";

    Obj_Div.style.border="1px solid #CCCCCC";

    Obj_Div.style.padding="3px";

    Obj_Div.style.lineHeight ="120%";

    Obj_Div.style.left=X+"px";

    Obj_Div.style.top=Y+"px";

    Obj_Div.style.whiteSpace="nowrap";

    Obj_Div.style.width= oWidth + "px";

    Obj_Div.style.height= oHeight + "px";

    obj.appendChild(Obj_Div);

    }

    //------------------------------------

    // 判斷Div是否存在

    // Joshua 2007-02-07

    //------------------------------------

    Search.IsDiv = function(Id){

    var result = true

    try{

    document.getElementById(Id).a=1;

    }catch(e){

    result = false

    }

    return(result);

    }

    //----------------------------

    // 刪除Div對(duì)象

    // Joshua 2007-02-07

    //----------------------------

    Search.RemoveDiv = function(Id){

    try{

    document.getElementById(Id).removeNode(true);

    }catch(e){}

    }

    //---------------------------

    // 遍歷清除無(wú)用Div對(duì)象

    // Joshua 2007-02-07

    //---------------------------

    Search.DelDiv = function(){

    try{

    document.getElementById("Div_Area").removeNode(true);

    document.getElementById("Data_Area").innerHTML = "<font face=\"webdings\" style=\"font-size:10px; color:#ff9900;\">4</font>" + document.getElementById("Data_Area").innerText.substring(1,document.getElementById("Data_Area").innerText.length);

    }catch(e){}

    try{

    document.getElementById("Div_School").removeNode(true);

    document.getElementById("Data_School").innerHTML = "<font face=\"webdings\" style=\"font-size:10px; color:#ff9900;\">4</font>" + document.getElementById("Data_School").innerText.substring(1,document.getElementById("Data_School").innerText.length);

    }catch(e){}

    try{

    document.getElementById("Div_Industry").removeNode(true);

    document.getElementById("Data_Industry").innerHTML = "<font face=\"webdings\" style=\"font-size:10px; color:#ff9900;\">4</font>" + document.getElementById("Data_Industry").innerText.substring(1,document.getElementById("Data_Industry").innerText.length);

    }catch(e){}

    try{

    document.getElementById("Div_Date").removeNode(true);

    document.getElementById("Data_Date").innerHTML = "<font face=\"webdings\" style=\"font-size:10px; color:#ff9900;\">4</font>" + document.getElementById("Data_Date").innerText.substring(1,document.getElementById("Data_Date").innerText.length);

    }catch(e){}

    }

    //--------------------------

    // 失去焦點(diǎn),清楚Div對(duì)象

    // Joshua 2007-02-07

    //--------------------------

    Search.Lostfocus = function(){

    if(!focusState){

    try{

    document.getElementById("Div_Area").removeNode(true);

    document.getElementById("Data_Area").innerHTML = "<font face=\"webdings\" style=\"font-size:10px; color:#ff9900;\">4</font>" + document.getElementById("Data_Area").innerText.substring(1,document.getElementById("Data_Area").innerText.length);

    }catch(e){}

    try{

    document.getElementById("Div_School").removeNode(true);

    document.getElementById("Data_School").innerHTML = "<font face=\"webdings\" style=\"font-size:10px; color:#ff9900;\">4</font>" + document.getElementById("Data_School").innerText.substring(1,document.getElementById("Data_School").innerText.length);

    }catch(e){}

    try{

    document.getElementById("Div_Industry").removeNode(true);

    document.getElementById("Data_Industry").innerHTML = "<font face=\"webdings\" style=\"font-size:10px; color:#ff9900;\">4</font>" + document.getElementById("Data_Industry").innerText.substring(1,document.getElementById("Data_Industry").innerText.length);

    }catch(e){}

    try{

    document.getElementById("Div_Date").removeNode(true);

    document.getElementById("Data_Date").innerHTML = "<font face=\"webdings\" style=\"font-size:10px; color:#ff9900;\">4</font>" + document.getElementById("Data_Date").innerText.substring(1,document.getElementById("Data_Date").innerText.length);

    }catch(e){}

    }

    }

    Search.ShowArea = function(){} //空對(duì)象

    //------------------------

    // 顯示地區(qū)一級(jí)菜單

    // Joshua 2007-02-07

    //------------------------

    Search.ShowArea.Init = function(){

    focusState = true;

    Search.DelDiv()//刪除其他DIV標(biāo)簽

    if(!Search.IsDiv("Div_Area")){//判斷對(duì)象是否建立,防止再次激發(fā)事件,引起的對(duì)象多次重復(fù)建立

    //更改Data_Area對(duì)象內(nèi)容

    document.getElementById("Data_Area").innerHTML = "<font face=\"webdings\" style=\"font-size:10px; color:#ff9900;\">6</font>" + document.getElementById("Data_Area").innerText.substring(1,document.getElementById("Data_Area").innerText.length);

    //顯示層

    Search.CreateDiv(document.body,"Div_Area",Search.getSelectPosition(document.getElementById("Data_Area"))[0],Search.getSelectPosition(document.getElementById("Data_Area"))[1]+12,80,0);

    //創(chuàng)建省級(jí)分類(lèi)

    for(var i=0;i<Data_Area_Province.length;i++){

    var Obj_Span = document.createElement("div");

    Obj_Span.setAttribute("id","Div_Area_Province_"+i);

    Obj_Span.setAttribute("value",i);

    Obj_Span.style.cursor="pointer";

    Obj_Span.onmouseover = function(){

    focusState = true;

    this.style.border="1px solid #827C5F";

    this.style.background="#CEC497";

    }

    Obj_Span.onmouseout = function(){

    focusState = false;

    if (!Date_DivState[this.getAttribute("value")]){

    this.style.border="0px solid #ffffff";

    this.style.background="#fff";}

    }

    Obj_Span.onclick = function(){

    focusState = true;

    //恢復(fù)非本對(duì)象的其他一級(jí)菜單項(xiàng)目樣式

    for(var i=0;i<Date_DivState.length;i++){

    if(Date_DivState[i]==true&&this.value!=document.getElementById("Div_Area_Province_"+i).value){

    document.getElementById("Div_Area_Province_"+i).style.border="0px solid #ffffff";

    document.getElementById("Div_Area_Province_"+i).style.background="#fff";

    }

    }

    //設(shè)置層狀態(tài)

    Date_DivState[this.getAttribute("value")] = true;

    //生成二級(jí)菜單

    Search.ShowArea.InitCity(this.getAttribute("value"),this)

    }

    Obj_Span.innerHTML = Data_Area_Province[i] + "<font face=\"webdings\" style=\"font-size:10px; color:#000;position:absolute;right:3px; \">4</font>";

    document.getElementById("Div_Area").appendChild(Obj_Span);

    }

    }

    }

    //----------------------

    // 顯示地區(qū)二級(jí)菜單

    // Joshua 2007-02-07

    //----------------------

    Search.ShowArea.InitCity = function(oId,obj){

    if(!Search.IsDiv("Div_Area_City_"+oId)){//判斷對(duì)象是否建立,防止再次激發(fā)事件,引起的對(duì)象多次重復(fù)建立

    //刪除除對(duì)象外存在的二級(jí)菜單對(duì)象

    for(var i=0;i<Date_DivState.length;i++){

    if(Date_DivState[i]==true&&i!=oId){

    Search.RemoveDiv("Div_Area_City_"+i);

    Date_DivState[i]=null;

    }

    }

    //生成指定的二級(jí)菜單對(duì)象

    Search.CreateDiv(obj,"Div_Area_City_"+oId,obj.offsetWidth,obj.offsetTop,50,0);

    if(oId<Data_Area_Province.length){

    for(var i=0;i<Data_Area_City[oId].length;i++){

    var Obj_Span = document.createElement("div");

    Obj_Span.setAttribute("id","Div_Area_City"+i);

    Obj_Span.style.cursor="pointer";

    Obj_Span.innerText = Data_Area_City[oId][i];

    Obj_Span.setAttribute("value",oId);

    Obj_Span.onmouseover = function(){

    focusState = true;

    this.style.border="1px solid #827C5F";

    this.style.background="#CEC497";

    }

    Obj_Span.onmouseout = function(){

    focusState = false;

    this.style.border="0px solid #ffffff";

    this.style.background="#fff";

    }

    Obj_Span.onclick = function(){

    //設(shè)置Data_Area的對(duì)象為選擇的職

    document.getElementById("Data_Area").innerHTML = "<font face=\"webdings\" style=\"font-size:10px; color:#ff9900;\">4</font>" + this.innerText;

    //刪除Div對(duì)象

    Search.RemoveDiv("Div_Area");

    //恢復(fù)狀態(tài)數(shù)組

    Date_DivState.length=0;

    }

    document.getElementById("Div_Area_City_"+oId).appendChild(Obj_Span);

    }

    }

    }

    }

    //-------------------

    // 學(xué)歷Div操作

    // Joshua 2007-02-07

    //-------------------

    Search.ShowSchool=function(){

    focusState = true;

    Search.DelDiv();//刪除其他DIV標(biāo)簽

    if(!Search.IsDiv("Div_School")){//判斷對(duì)象是否建立,防止再次激發(fā)事件,引起的對(duì)象多次重復(fù)建立

    document.getElementById("Data_School").innerHTML = "<font face=\"webdings\" style=\"font-size:10px; color:#ff9900;\">6</font>" + document.getElementById("Data_School").innerText.substring(1,document.getElementById("Data_School").innerText.length);

    Search.CreateDiv(document.body,"Div_School",Search.getSelectPosition(document.getElementById("Data_School"))[0],Search.getSelectPosition(document.getElementById("Data_School"))[1]+12,60,0);

    for(var i=0;i<Data_School.length;i++){

    var Obj_Span = document.createElement("div");

    Obj_Span.setAttribute("id","Div_School_"+i);

    Obj_Span.setAttribute("value",i);

    Obj_Span.style.cursor="pointer";

    Obj_Span.onmouseover = function(){

    focusState = true;

    this.style.border="1px solid #827C5F";

    this.style.background="#CEC497";

    }

    Obj_Span.onmouseout = function(){

    focusState = false;

    this.style.border="0px solid #ffffff";

    this.style.background="#fff";

    }

    Obj_Span.onclick = function(){

    document.getElementById("Data_School").innerHTML = "<font face=\"webdings\" style=\"font-size:10px; color:#ff9900;\">4</font>" + this.innerText;

    Search.RemoveDiv("Div_School");

    }

    Obj_Span.innerHTML = Data_School[i];

    document.getElementById("Div_School").appendChild(Obj_Span);

    }

    }

    }

    //----------------------

    // 行業(yè)Div操作

    // Joshua 2007-02-07

    //----------------------

    Search.ShowIndustry = function(){

    focusState = true;

    Search.DelDiv();//刪除其他DIV標(biāo)簽

    if(!Search.IsDiv("Div_Industry")){//判斷對(duì)象是否建立,防止再次激發(fā)事件,引起的對(duì)象多次重復(fù)建立

    document.getElementById("Data_Industry").innerHTML = "<font face=\"webdings\" style=\"font-size:10px; color:#ff9900;\">6</font>" + document.getElementById("Data_Industry").innerText.substring(1,document.getElementById("Data_Industry").innerText.length);

    Search.CreateDiv(document.body,"Div_Industry",Search.getSelectPosition(document.getElementById("Data_Industry"))[0],Search.getSelectPosition(document.getElementById("Data_Industry"))[1]+12,160,0);

    for(var i=0;i<Data_Industry.length;i++){

    var Obj_Span = document.createElement("div");

    Obj_Span.setAttribute("id","Div_Industry_"+i);

    Obj_Span.setAttribute("value",i);

    Obj_Span.style.cursor="pointer";

    Obj_Span.onmouseover = function(){

    focusState = true;

    this.style.border="1px solid #827C5F";

    this.style.background="#CEC497";

    }

    Obj_Span.onmouseout = function(){

    focusState = false;

    this.style.border="0px solid #ffffff";

    this.style.background="#fff";

    }

    Obj_Span.onclick = function(){

    document.getElementById("Data_Industry").innerHTML = "<font face=\"webdings\" style=\"font-size:10px; color:#ff9900;\">4</font>" + this.innerText;

    Search.RemoveDiv("Div_Industry");

    }

    Obj_Span.innerHTML = Data_Industry[i];

    document.getElementById("Div_Industry").appendChild(Obj_Span);

    }

    }

    }

    //-----------------------------

    // 時(shí)間Div操作

    // Joshua 2007-02-07

    //-----------------------------

    Search.ShowDate = function(){

    focusState = true;

    Search.DelDiv();//刪除其他DIV標(biāo)簽

    if(!Search.IsDiv("Div_Date")){//判斷對(duì)象是否建立,防止再次激發(fā)事件,引起的對(duì)象多次重復(fù)建立

    document.getElementById("Data_Date").innerHTML = "<font face=\"webdings\" style=\"font-size:10px; color:#ff9900;\">6</font>" + document.getElementById("Data_Date").innerText.substring(1,document.getElementById("Data_Date").innerText.length);

    Search.CreateDiv(document.body,"Div_Date",Search.getSelectPosition(document.getElementById("Data_Date"))[0],Search.getSelectPosition(document.getElementById("Data_Date"))[1]+12,60,0);

    for(var i=0;i<Data_Date.length;i++){

    var Obj_Span = document.createElement("div");

    Obj_Span.setAttribute("id","Div_Date_"+i);

    Obj_Span.setAttribute("value",i);

    Obj_Span.style.cursor="pointer";

    Obj_Span.onmouseover = function(){

    focusState = true;

    this.style.border="1px solid #827C5F";

    this.style.background="#CEC497";

    }

    Obj_Span.onmouseout = function(){

    focusState = false;

    this.style.border="0px solid #ffffff";

    this.style.background="#fff";

    }

    Obj_Span.onclick = function(){

    document.getElementById("Data_Date").innerHTML = "<font face=\"webdings\" style=\"font-size:10px; color:#ff9900;\">4</font>" + this.innerText;

    Search.RemoveDiv("Div_Date");

    }

    Obj_Span.innerHTML = Data_Date[i];

    document.getElementById("Div_Date").appendChild(Obj_Span);

    }

    }

    }

    //-----------------------

    // 獲取一個(gè)對(duì)象的坐標(biāo)

    //------------------------

    Search.getSelectPosition = function(Gobj) {

    var objLeft = Gobj.offsetLeft;

    var objTop = Gobj.offsetTop;

    var objParent = Gobj.offsetParent;

    while (objParent!= null) {

    objLeft += objParent.offsetLeft;

    objTop += objParent.offsetTop;

    objParent = objParent.offsetParent;

    }

    return([objLeft,objTop]);

    }

    //------------------------

    // 頁(yè)面初始化

    //------------------------

    window.onload=function(){

    Search.Init();

    }

    window.document.onclick=function (){

    Search.Lostfocus();

    }

    </script>

    <style>

    BODY{FONT-SIZE: 12px;}

    </style>

    </head>

    <body>

    <span id="Data_Area" style="cursor:pointer;"><font face="webdings" style="font-size:10px; color:#ff9900;">4</font>地區(qū)</span>

    <span id="Data_School" style="cursor:pointer;"><font face="webdings\" style="font-size:10px; color:#ff9900;">4</font>學(xué)歷</span>

    <span id="Data_Industry" style="cursor:pointer;"><font face="webdings" style="font-size:10px; color:#ff9900;">4</font>行業(yè)</span>

    <span id="Data_Date" style="cursor:pointer;"><font face="webdings" style="font-size:10px; color:#ff9900;">4</font>時(shí)間</span>

    </body>

    </html>

    以上就是關(guān)于百度點(diǎn)擊下拉事件的代碼相關(guān)問(wèn)題的回答。希望能幫到你,如有更多相關(guān)問(wèn)題,您也可以聯(lián)系我們的客服進(jìn)行咨詢(xún),客服也會(huì)為您講解更多精彩的知識(shí)和內(nèi)容。


    推薦閱讀:

    手機(jī)百度綜合怎么變?nèi)浚ㄔ趺窗寻俣鹊娜琳{(diào)回去)

    百度李彥宏:以簡(jiǎn)單可依賴(lài)的原則運(yùn)營(yíng)公司,堅(jiān)持長(zhǎng)期主義

    福建百度包年推廣收費(fèi)(福建百度包年推廣收費(fèi)嗎)

    關(guān)鍵詞是什么意思三年級(jí)(關(guān)鍵詞是什么意思三年級(jí)下冊(cè))

    楊浦區(qū)庭院景觀(guān)設(shè)計(jì)價(jià)格(楊浦區(qū)庭院景觀(guān)設(shè)計(jì)價(jià)格多少)