use Jquery in Telerik

本文介绍如何在网页中使用Telerik Web Controls并结合jQuery实现交互效果,通过实例展示了如何利用$ telerik.$ 实现jQuery功能。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

http://www.telerik.com/help/aspnet-ajax/introduction-using-jquery.html

There are some Telerik Web Controls are using Jquery, Please check those control list via above URL. If you have used any of these web controls in your web page, then you are able to use $telerik.$ to utilize Jquery

3. Using the $telerik.$ alias:

CopyJavaScript
<script type="text/javascript">
    $telerik.$(document).ready(function () {
        alert("Document is ready");
    });
</script> 

e.g.:

<%@ Page Title="Home Page" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true"
    CodeBehind="Default.aspx.cs" Inherits="WebApplication1._Default" %>

<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>

<asp:Content ID="HeaderContent" runat="server" ContentPlaceHolderID="HeadContent">
</asp:Content>
<asp:Content ID="BodyContent" runat="server" ContentPlaceHolderID="MainContent">
    <h2>
        Welcome to ASP.NET!
    </h2>
    <p>
        To learn more about ASP.NET visit <a href="http://www.asp.net" title="ASP.NET Website">www.asp.net</a>.
    </p>
    <p>
        You can also find <a href="http://go.microsoft.com/fwlink/?LinkID=152368&clcid=0x409"
            title="MSDN ASP.NET Docs">documentation on ASP.NET at MSDN</a>.
    </p>
    <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
    </telerik:RadScriptManager>
    <telerik:RadComboBox ID="RadComboBox1" runat="server">
    </telerik:RadComboBox>
    <span id="spantest">abc</span>
    <input id="Button2" type="button" value="jquery button" οnclick="javascript: alert($telerik.$('#spantest').text())"/>
    <input id="Button1" type="button" value="normal button" οnclick="javascript: alert(document.getElementById('spantest').innerText)"/>
</asp:Content>



评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值