【发布时间】:2011-08-02 12:16:15
【问题描述】:
我有一个简单的页面,一旦页面完成加载,我需要打开打印对话框,我打算使用 jquery 来实现这一点,但是我似乎无法让我的 jquery 运行。
我已按照Telerik 上的指南进行操作,因为我们正在使用他们的控件,为了简单起见,我不想引入多个版本的 jQuery,除非它绝对必要,我认为它不是。
我已经尝试了其中列出的一些方法,但似乎都没有用,不过用普通的 JS 警报替换 jquery 是可行的。
这是代码:
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Print.aspx.cs" Inherits="Web.Modules.Plan.Print"
Theme="Plan" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>Print Your plan</title>
<script type="text/javascript">
$(document).ready(function () {
alert("Document is ready");
});
</script>
</head>
<body>
<form id="form1" runat="server">
<telerik:RadScriptManager runat="server" ID="RadScriptManager" >
<Scripts>
<asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.Core.js" />
<asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQuery.js" />
<asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQueryInclude.js" />
</Scripts>
</telerik:RadScriptManager>
<div>
<div id="divInstrumentTitle" runat="server" class="InstrumentTitle">
<asp:Label runat="server" ID="lblInstrumentTitle" CssClass="InstrumentTitle" /></div>
<asp:Panel runat="server" ID="pnlEplan" />
</div>
</form>
</body>
</html>
关于这里发生了什么的任何想法?
【问题讨论】:
-
您确定附加了什么 jquery-library.js 吗?我没有看到 '