Javascript 当文本区域有内容且键盘打开时,按钮单击不工作

Javascript 当文本区域有内容且键盘打开时,按钮单击不工作,javascript,jquery,html,css,responsive-design,Javascript,Jquery,Html,Css,Responsive Design,我不知道如何恰当地问这个问题。我在谷歌上搜索了很多,但不知道发生了什么 我在一个带有文本区和输入按钮的响应页面中有一个HTML表单。 在Chrome Mobile中打开页面当textarea有文本且键盘打开时如果我单击按钮,则不会触发click事件。 我必须隐藏键盘,然后单击按钮。 这样行 我迷路了,因为HTML/CSS/JavaScript不是我的强项 下面是一些代码: <footer id="footer"> <div class="inner"&g

我不知道如何恰当地问这个问题。我在谷歌上搜索了很多,但不知道发生了什么

我在一个带有文本区和输入按钮的响应页面中有一个HTML表单。 在Chrome Mobile中打开页面当textarea有文本且键盘打开时如果我单击按钮,则不会触发click事件。 我必须隐藏键盘,然后单击按钮。 这样行

我迷路了,因为HTML/CSS/JavaScript不是我的强项

下面是一些代码:

<footer id="footer">
            <div class="inner">

                <h3>Get in touch</h3>

                <form action="#" method="post">

                    <div class="field half first">
                        <label for="name">Name</label>
                        <input name="name" id="name" type="text" placeholder="Name">
                    </div>
                    <div class="field half">
                        <label for="email">Email</label>
                        <input name="email" id="email" type="email" placeholder="Email">
                    </div>
                    <div class="field">
                        <label for="message">Message</label>
                        <textarea name="message" id="message" rows="6" placeholder="Message"></textarea>
                    </div>
                    <ul class="actions">
                        <li><input id="send" value="Send Message" class="button alt" type="button"></li>
                    </ul>
                </form>                 

            </div>
        </footer>
注意:Jquery处理按钮单击。

尝试以下操作:

 $("#send").on("click touchstart", function (e) {
     console.log(new Date());
 });        

你应该给我们一些代码来帮助我们you@Ivan把代码扔到那边去。这能让人稍微明白一点吗?页脚标记是动态生成的吗?你能试着将事件锚定到身体上吗<代码>$(“body”)。在(“单击”,“发送”,函数(e){console.log(new Date());})上@threeFatCat否,页脚不是动态的。我会尝试你的建议,然后反馈回来。此外,你发布的javascript代码是否用document.ready包装在实际代码中?我必须删除“click”,只留下“touchstart”。否则事件将触发两次。这样做有效。
 $("#send").on("click touchstart", function (e) {
     console.log(new Date());
 });