我已经在我的 asp.net MVC3 应用程序中实现了自动完成文本框,但是在搜索期间我无法在文本框中显示加载图像。我的代码是
Javascript
<link rel="stylesheet" href="http://code.jquery.com/ui/1.9.2/themes/base/jquery-ui.css" />
<script src="http://code.jquery.com/jquery-1.8.3.js" type="text/javascript"></script>
<script src="http://code.jquery.com/ui/1.9.2/jquery-ui.js" type="text/javascript"></script>
<script language="javascript" type="text/javascript">
$(document).ready(function () {
$("#txtPONO").autocomplete({
source: "/Transection/GetPONO",
minLength: 2,
select: function (event, ui) {
$("#hdnPurContID").val(ui.item.id);
}
});
});
</script>
看法
<div style="float: left; padding: 9px 5px 5px 5px; width: 80px; vertical-align: middle"
class="fieldHead">
Enter @Html.LabelFor(l => l.PurchaseContract.AOPLPONO)
</div>
<div style="float: left; width: 200px; padding: 5px 0px 5px 0px;">
@Html.TextBoxFor(m => m.PurchaseContract.AOPLPONO, new { @id = "txtPONO", @class = "textbox", @style = "width:100%" })
</div>
<div style="float: left; width: 50px; padding: 4px 0px 0px 5px;">
<img alt="search" src="../../Content/images/Search.png" />
@Html.HiddenFor(model => model.PurchaseContract.PurContID, new { @id = "hdnPurContID" })
</div>
我想在右侧的文本框中显示一个小的加载图像