[英]HTML input value changed by javascript, onchange doesn't work
In my HTML code I have the following input field, which is part of a form: 在我的HTML代码中,我具有以下输入字段,它是表单的一部分:
<input type="text" name="group[{$sConfigurator.groupID}]" value="{$optionTopOptionID}" id="{$formSelectID}" onChange="this.form.submit();"/>
The value is changed by a javascript function. 该值由javascript函数更改。 The problem is, that the submission of the form isn't triggered.
问题在于,表单的提交未触发。 How can I do this?
我怎样才能做到这一点?
it seems everything is right. 似乎一切正确。 try it with a submit input type and lower case of onchange :
尝试使用Submit输入类型和onchange的小写字母:
<form action="example.php">
<input type="text" name="group[{$sConfigurator.groupID}]" value="{$optionTopOptionID}" id="{$formSelectID}" onchange="this.form.submit();"/>
<input type="submit" name="blabla" value="push!" />
</form>
is it works? 有效吗?
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.