[英]Submitting HTML Forms with Slider as input (WebFX)
How can I submit the value of this slider to a CGI application (like you would a check box)? 如何将此滑块的值提交给CGI应用程序(就像您选择一个复选框一样)? Not sure if the input tag for the slider is messing something up?
不确定滑块的输入标签是否混乱了?
<div class="slider" id="slider-1" tabIndex="1">
<input class="slider-input" id="slider-input-1"
name="slider-input-1"/>
</div>
If I were you, I'd try tweaking the <input>
tag's type
attribute, setting it to text
or hidden
. 如果您是我,我将尝试调整
<input>
标记的type
属性,将其设置为text
或hidden
。
(I don't know enough about the framework/environment you're using to say for sure.) (对于您肯定要说的框架/环境,我还不了解。)
OK got it: 好的,我知道了:
<form action="/cgi-bin/Lib.exe" method=POST name="slider" ID="Form2">
<input type="hidden" name="user" value="" ID="Text1">
</form>
<input type="button" value="Delete" class="btn" onclick="setval()" onmouseover="hov(this, 'btn btnhov')" onmouseout="hov(this, 'btn')" ID="Button1" NAME="Button1"/>
function setval()
{
//alert(s.getValue());
document.slider.user.value = s.getValue();//set value of hidden text box to value of slider
document.slider.submit();
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.