[英]how to bind value of javascript to a lable in asp C#
I have a Javascript rails slider with changeable value, i want to bind its value to a asp label and use in in code behind, thanks for your help. 我有一个Javascript Rails滑块,其值可以更改,我想将其值绑定到asp标签,并在后面的代码中使用,谢谢您的帮助。
lable: 标签:
<asp:Label ID="Lbl1" runat="server" Text="Label" Visible="False"></asp:Label>
javascript: 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>
the current value is "5" but it can be changed by user and i want to assign this value to asp label. 当前值为“ 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.