+ -
当前位置:首页 → 问答吧 → 求救 asp.net & JQuery

求救 asp.net & JQuery

时间:2014-02-18

来源:互联网

我现在的问题是 为何 单click 不能引发 progressbar function而是双click?
希望有好心人能解答, 谢谢!!!!!!!

<head runat="server">
<title></title>
<link rel="stylesheet" href="http://code.jquery.com/ui/1.10.3/themes/smoothness/jquery-ui.css" />
<script src="http://code.jquery.com/jquery-1.9.1.js"></script>
<script src="http://code.jquery.com/ui/1.10.3/jquery-ui.js"></script>
<link rel="stylesheet" href="/resources/demos/style.css" />

<style type="text/css">
.ui-progressbar {
position: relative;
}
#progressbar
{
position:fixed;
z-index: 100;
top:60%;
width:100%;
height:50px;
font-weight: bold;
}
.progress-label {
float: left;
margin-left: 50%;
z-index: 100;
margin-top: 5px;
font-weight: bold;
height: 30px;
font-size:14pt;
}
</style>
<script type="text/javascript" >
$(document).ready(function () {
$("#<%=Button1.ClientID %>").click(function () {
var progressbar = $("#progressbar"), progressLabel = $(".progress-label");

progressbar.progressbar({
value: false,
change: function () {
progressLabel.text(progressbar.progressbar("value") + "%");
},
complete: function () {
progressLabel.text("Complete!");
progressbar.progressbar.css("display", "none");
}
});

function progress() {
var val = progressbar.progressbar("value") || 0;

progressbar.progressbar("value", val + 1);

if (val < 99) {
setTimeout(progress, 100);
}
}

setTimeout(progress, 1000);
});
});
</script>
</head>
<body>
<form id="form1" runat="server">
<asp:Button ID="Button1" runat="server" Text="Button"/>

<div id="progressbar">
<div class="progress-label">Loading...</div>
</div>
</form>
</body>

Loading...


Loading...

Loading...



[ 本帖最后由 saturn1022 於 2013-10-25 10:48 AM 编辑 ]

作者: saturn1022   发布时间: 2014-02-18

你post 埋 client site D Code出黎啦, 因为 asp.net 系有可能会改变 button ID架.

作者: wingwell   发布时间: 2014-02-18

no client -side /behind code

[ 本帖最后由 saturn1022 於 2013-10-25 10:49 AM 编辑 ]

作者: saturn1022   发布时间: 2014-02-18

用browser view code 睇返html code喎

作者: wingwell   发布时间: 2014-02-18

热门下载

更多