jquery郵箱自動補全

來源:互聯網
上載者:User

標籤:style   blog   http   color   java   使用   io   strong   

在使用前需要有如下檔案:

jquery-1.7.1.min.js

jquery.mailAutoComplete-3.1.js

大家可以到網上下載:

【jquery.mailAutoComplete-3.1.js】的請到這裡下載:  http://download.csdn.net/detail/xiaolinzai888/7794939

[jquery-1.7.1.min.js]可以到jquery官網下載

頁面

 

<!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>
<style>
  .out_box{border:1px solid #ccc; background:#fff; font:12px/20px Tahoma;}
  .list_box{border-bottom:1px solid #eee; padding:0 5px; cursor:pointer;}
  .focus_box{background:#f0f3f9;}
  .mark_box{color:#c00;}
</style>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>郵箱自動提示</title>
</head>
<script src="jquery-1.7.1.min.js" type="text/javascript"></script>
<script src="jquery.mailAutoComplete-3.1.js" type="text/javascript"></script>
<body>
<br />
<br />
<p>郵箱自動提示:<input type="text" id="customTest" size="28" /></p>
</body>
</html>
<script>

$(function(){

   $("#customTest").mailAutoComplete({ 
  boxClass: "out_box", //外部box樣式 
  listClass: "list_box", //預設的列表樣式 
  focusClass: "focus_box", //列表選樣式中 
  markCalss: "mark_box", //高亮樣式 
  autoClass: true, 
  textHint: true, //提示文字自動隱藏 
  hintText: "請填寫郵箱地址" 
  });  

});
</script>

 

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.