标签:footer 分享 com 使用 data-bind its auto require serve
jqAutoComplete:自动补全查询
用到的库:
代码:
<%@ Page Title="" Language="C#" MasterPageFile="~/CAT66.Master" AutoEventWireup="true" CodeBehind="jqAutoTest.aspx.cs" Inherits="Cat66WeekDay.jqAutoTest" %> <asp:Content ID="Content1" ContentPlaceHolderID="header" runat="server"> <!-- cat66:jqAutoComplete插件使用方法 --> </asp:Content> <asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server"> <div> select:<input id="selectFruit" data-bind="value:fruit"/> </div> <span data-bind="text:fruit"></span> </asp:Content> <asp:Content ID="Content3" ContentPlaceHolderID="footer" runat="server"> <script type="text/javascript"> require([‘jquery‘, ‘knockout‘, ‘jqAutoComplete‘, ‘jquery.ui‘], function ($, ko, jqAuto) { $(function () { var Fruits = [ "Apple", "Banana", "Pear", "Grape" ]; $("#selectFruit").autocomplete({ source:Fruits }); }); function ViewModel() { var self = this; self.fruit = ko.observable(‘‘); } ko.applyBindings(new ViewModel()); }); </script> </asp:Content>
标签:footer 分享 com 使用 data-bind its auto require serve
原文地址:http://www.cnblogs.com/cat66/p/7755666.html