jQuery电子邮件地址输入

jQuery电子邮件地址输入,第1张

jQuery电子邮件地址输入

有很多的jquery位可以做到这一点,您可以在Google上搜索“ jquery autocomplete”,然后看看最喜欢哪个。

这是比较有名的一个:http :
//docs.jquery.com/Plugins/AutoComplete

<script>    var emails = [        { name: "Kitty Sanchez", to: "kanchez@bluth.com" },        { name: "Lucille Austero", to: "lucille2@balboatowers.net" },        { name: "Bob Loblaw", to: "bloblaw@bobloblawlawblog.com" },        { name: "Sally Sitwell", to: "sally@sitwell.org" }    ];    $(document).ready(function(){        $("#Recipients").autocomplete(emails, { multiple: true, minChars: 1, matchContains: "word", autoFill: false, formatItem: function(row, i, max) {     return """ + row.name + "" &lt;" + row.to + "&gt;"; }, formatMatch: function(row) {     return row.name + " " + row.to; }, formatResult: function(row, i, max) {     return """ + row.name + "" <" + row.to + ">"; }        });    });</script>


欢迎分享,转载请注明来源:内存溢出

原文地址:https://54852.com/zaji/4960597.html

(0)
打赏 微信扫一扫微信扫一扫 支付宝扫一扫支付宝扫一扫
上一篇 2022-11-13
下一篇2022-11-13

发表评论

登录后才能评论

评论列表(0条)

    保存