篮球外围下注_篮球投注导航_[所有网址]

篮球外围下注_篮球投注导航_[所有网址]是该公司为打造信誉第一,2014最新体验金,篮球外围下注_篮球投注导航_[所有网址]这里的所有老虎机游戏及真人百家乐游戏都具有欧洲风格,致力成为最具传播力和互动性的娱乐城网站。

jQuery UI 实现email输入提示实例

2019-09-13 19:51 来源:未知

效果:
图片 1 

页面:

复制代码 代码如下:

复制代码 代码如下:

使用了Jquery UI ,要导入的js和css:
<link rel="stylesheet" href="../../themes/base/jquery.ui.all.css">
<link rel="stylesheet" href="../demos.css">
<script src="../../jquery-1.7.2.js"></script>
<script src="../../ui/jquery.ui.core.js"></script>
<script src="../../ui/jquery.ui.widget.js"></script>
<script src="../../ui/jquery.ui.position.js"></script>
<script src="../../ui/jquery.ui.autocomplete.js"></script>

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Test.aspx.cs" Inherits="web_Test" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" ";
<html xmlns=";
<head runat="server">
<title>测试</title>
<link type="text/css" rel="stylesheet" />
<link href="../css/jquery.ui.all.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src=";
<!-- 解决下拉列表框被遮盖 jquery.bgiframe -->
<script type="text/javascript" language="javascript" src="../js/jQui/jquery.bgiframe-2.1.1.js"></script>
<script type="text/javascript" language="javascript" src="../js/jQui/jquery.ui.core.js"></script>
<script type="text/javascript" language="javascript" src="../js/jQui/jquery.ui.widget.js"></script>
<script type="text/javascript" language="javascript" src="../js/jQui/jquery.ui.mouse.js"></script>
<!-- jquery.ui.autocomplete -->
<script type="text/javascript" language="javascript" src="../js/jQui/jquery.ui.autocomplete.js"></script>
<script language="javascript" type="text/javascript">
$(function(){
$("#txtTest").autocomplete({
minLength:1,
source: function(request, response) {
$.ajax({
url: "../ajax/GetAllWords.ashx",
dataType: "json",
data: request,
success: function( data ) {
response( data );
}
});
}
});
});
</script>
</head>
<body>
<form id="form1" runat="server">
<div>
<input id="txtTest" type="text" />
</div>
</form>
</body>
</html>

<script>
var emails=["163.com","yahoo.com","yahoo.cn","126.com","sina.com"];
$( function () {
//为输入框绑定事件
$( "#email" ).keyup( function(){
emailiInp();
});
});
function emailiInp(){
var arrs= new Array()
inpVal=$( "#email" ).val();
//根据输入的值,动态的创建下拉列表
$.each(emails, function (index,info){
if (inpVal.indexOf("@" )==-1)
{
//没有输入@
arrs[index]=inpVal "@" info;
} else {
//输入@
arrs[index]=inpVal.substring(0,inpVal.indexOf( "@" )) "@" info;
}
})
$( "#email" ).autocomplete({
//绑定下拉列表内容
source: arrs
});
}
</script>
最后再来个文本框:
<input id="email" />

后台:

TAG标签: 篮球外围下注
版权声明:本文由篮球外围下注发布于系统,转载请注明出处:jQuery UI 实现email输入提示实例