第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號(hào)安全,請(qǐng)及時(shí)綁定郵箱和手機(jī)立即綁定

下拉框顯示不出來,可以幫幫忙看下嗎?


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">

<head>

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

<title>YOYO search</title>

<style type="text/css">

body{

background-color:#333;}

.bg-div{

background-image:url(yoyo.jpg);

width:1228px;

height:690px;

margin:0 auto;

position:relative;

? ? ? }

?.logo{

?-4px 18px 0 0;

?background-image:url(logo1.png);

?width:60px;

?height:53px;

?float:left;

?}

?form{

?float:left;

?background-color:#fff;

?padding:12px;

?}

?.search-text{

?border:0;

?float:left;

?height:25px;

?line-height:25px;

?outline:none;

?width:350px;

?}

?.search-button{

?border:0;

?background-image:url(search-button.png);

?width:29px;

?height:29px;

?float:left;

?}

?.search-box{

?position:absolute;

?top:200px;

?left:300px;

?}

?.suggest{

?width:388px;

?background-color:#fff;

?border:1px solid #999

?}

? ? ? ? ? ?.suggest ul{

? list-style:none;

? margin:0;

? padding:0;

? }

? ? ?.suggest ul li{

?padding:3px;

?font-size:14px;

?line-height:25px;

?cursor:pointer;

?}

?.suggest ul li:hover{

text-decoration:underline;

background-color:#e5e5e5; ?

?}

?

</style> ??

</head>


<body>

? ? <div class="bg-div">

? ? ? ?<div class="search-box">

? ? ? ? <div class="logo"></div>

? ? ? ? <form class="search-form" action="http://cn.bing.com/search" target="_blank" id="search-form">?

? ? ? ? <input type="text" class="search-text" name="q" id="search_input" autocomplete="off"/>

? ? ? ? <input type="submit" class="search-button" value=""/>

? ? ? ? </form>?

? ? ? ? </div>

? ? </div>

? ? <div class="suggest" id="search-suggest" style="display:none">

? ? <ul id="searach-result">

? ? ? ? <li>搜索結(jié)果1</li>

? ? ? ? <li>搜索結(jié)果2</li>

? ? ? </ul>

? ? ? </div>

? ? ? ? <script src="http://code.jquery.com/jquery-1.10.2.min.js"></script>

? ? ? ? <script>

$('#search_input').bind('keyup',function(){

var searchText=$('#search_input').val();

$.get('http://api.bing.com/qsonhs.aspx?q='+searchText,function(d){

var d=d.AS.Results(0).Suggests;

var html='';

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

html+='<li>'+d[i].Txt+'</li>'};

$('search-result').html(html);

$('search-suggest').show().css({

top:$('#search-form').offset().top+$('#search-form').height(),

left:$('#search-form').offset().left,

position:'absolute'

});

},'json');

});

$(document).bind('click',function(){

$('#search-suggest').hide();

});

</script>

</body>

</html>


正在回答

1 回答

id選擇器缺少#號(hào)?

$('search-result').html(html);

$('search-suggest').show().css


0 回復(fù) 有任何疑惑可以回復(fù)我~

舉報(bào)

0/150
提交
取消
搜索框制作
  • 參與學(xué)習(xí)       66018    人
  • 解答問題       463    個(gè)

本課程從簡入深講解搜索框的制作,學(xué)習(xí)JQ與JS實(shí)現(xiàn)Ajax技術(shù)的不同點(diǎn)

進(jìn)入課程

下拉框顯示不出來,可以幫幫忙看下嗎?

我要回答 關(guān)注問題
微信客服

購課補(bǔ)貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動(dòng)學(xué)習(xí)伙伴

公眾號(hào)

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號(hào)