开发者

Javascript Form Onchange hack with Google Chrome and IE7

开发者 https://www.devze.com 2023-02-23 14:40 出处:网络
<form onchange=\"return valid(\'form changed\')\"> <select> <option>uno</option>
<form onchange="return valid('form changed')">
 <select>
  <option>uno</option>
  <option>dos</option>
 </select>
 <input type="radio" name="videoDevice" value="cuatro" checked="checked" />
</form>开发者_运维百科;

onchange event is not working with google chrome and ie7 ... how to hack it ... onchange is not required on select tag and we can't use jquery ...


there is no onchange event

you need onsubmit to validate prior to posting to the server
or
to hook up some events on the dom elements onclick, onchange depending on the element
that inform the user directly


You can use jquery on the input as well.

$("input").change(function(){ //Do stuff here });
0

精彩评论

暂无评论...
验证码 换一张
取 消