我在我的内容占位符中使用了这个量规。
http://www.dariancabot.com/projects/jgauge_wip/
脚本:
<link rel="stylesheet" href="Scripts/jgauge.css" type="text/css" />
<script type="text/javascript" src="Scripts/jquery-1.8.0.js"></script>
<script language="javascript" type="text/javascript" src="Scripts/jgauge-0.3.0.a3.js"></script>
<script language="javascript" type="text/javascript" src="Scripts/jQueryRotate.2.2.js"></script>
<script language="javascript" type="text/javascript" src="Scripts/excanvas.min.js"></script>
<script type="text/javascript">
var demoGauge1 = new jGauge(); // Create a new jGauge.
demoGauge1.id = 'jGaugeDemo1'; // Link the new jGauge to the placeholder DIV.
$(document).ready(function () {
demoGauge1.init(); // Put the jGauge on the page by initializing it.
});
</script>
标记:
<asp:UpdatePanel ID="up1" runat="server">
<ContentTemplate>
<div id="jGaugeDemo1" class="jgauge"></div>
</ContentTemplate>
<Triggers>
<asp:AsyncPostBackTrigger ControlID="myBtn" />
</Triggers>
</asp:UpdatePanel>
<asp:Button ID="myBtn" runat="server" Text="Refresh" />
我在母版页上有脚本管理器:
<asp:ScriptManager ID="ScriptManager1" runat="server" EnablePartialRendering="true"></asp:ScriptManager>
但是在异步回发(点击'myBtn')之后,仪表消失了。帮助。