选择框onclick表单提交应该发生 [英] select box onclick form submission should happen

查看:69
本文介绍了选择框onclick表单提交应该发生的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我点击选择框时,联系表单提交应该同时发生..这意味着选择选择框,表单提交应该发生。



pls指导我的解决方案



这是我的代码

< select> 
< option class =fix> one< / option>
< option> two< / option>
< option>三< / option>
< / select>


< form class =form-horizo​​ntal contact_formid =contactForm1
name =myformaction =Form.phpmethod =postenctype = 多部分/格式数据 >
< label>名称< / label>
< input type =text>
< label>地址< / label>
< input type =textplaceholder =address>
< label>电子邮件ID< / label>
< input type =textplaceholder =email id>
< br>
< button value =Submittype =submitname =submitid =submit> submit< / button>
< script>

$(document).ready(function(){
$(。fix)。click(function(){
$(#submit)。onclick ();
alert(你好);
});
});


< / script>



i试过类似这样的东西

解决方案

(文件)。就绪(函数(){

( 固定)。单击(函数(){

( #submit)。onclick();
alert(hello);
});
});


< / script>



我尝试过这样的事情


when i have click the select box, contact form submission should happen at same time.. which means selecting the select box, form submission should happen.

pls guide me for the solution

here is my code

     <select>
    <option class="fix">one</option>
    <option>two</option>
    <option>three</option>
   </select>


<form class="form-horizontal contact_form"  id="contactForm1"
name="myform"     action="Form.php" method="post"  enctype="multipart/form-data">
<label>Name</label>
<input type="text">
<label>Address</label>
<input type="text" placeholder="address">
<label>email id</label>
<input type="text" placeholder="email id">
<br>
<button  value="Submit" type="submit" name="submit" id="submit">submit</button>
<script>

$(document).ready(function(){
$(".fix").click(function(){
$("#submit").onclick();
alert("hello");
});
}); 


</script>


i have tried something like this

解决方案

(document).ready(function(){


(".fix").click(function(){


("#submit").onclick(); alert("hello"); }); }); </script>


i have tried something like this


这篇关于选择框onclick表单提交应该发生的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆