![](/img/trans.png)
[英]Display Current Date as Lable Text using JavaScript in ASP.NET page C#
[英]how to bind value of javascript to a lable in asp C#
我有一个Javascript Rails滑块,其值可以更改,我想将其值绑定到asp标签,并在后面的代码中使用,谢谢您的帮助。
标签:
<asp:Label ID="Lbl1" runat="server" Text="Label" Visible="False"></asp:Label>
javascript:
<script type="text/javascript">
$("#appearance7").roundSlider({
radius: 70,
width: 8,
handleSize: "+16",
handleShape: "dot",
sliderType: "min-range",
value: 5,
max: 10,
mouseScrollAction: true,
min: 1
});
</script>
当前值为“ 5”,但用户可以更改,我想将此值分配给asp标签。
$("#appearance7").roundSlider({ radius: 70, width: 8, handleSize: "+16", handleShape: "dot", sliderType: "min-range", value: 5, max: 10, mouseScrollAction: true, min: 1, change: "onValueChange" }); function onValueChange (e) { $("#Lbl1").val(e.value); }
<asp:Label ID="Lbl1" runat="server" Text="Label" Visible="False" ClientIDMode="Static"></asp:Label>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.