疑难解答 - 提交按钮出了问题

时间:2015-01-27 14:49:54

标签: javascript html ajax gwt

我无法弄清楚是什么!      当你点击提交时没有任何事情发生,没有错误,没有什么能让你难以诊断,

有什么想法?这是代码片段

PS感谢早期的海报帮助正确发布

<tr>
<td>Image File</td>
<td>
<input type="file" name="uploadedFile" class="gwt-FileUpload">
</td>

</ol></div>
                <div style="width: 100%; display: block; float: right;">
                    <button id="send" type="submit">
                        Send
                    </button>
                </div>
            </form>
        </div>
        <script type="text/javascript">
            function postToGoogle() {
                var field1 = $("input[type='radio'][name='qs1']:checked").val();
                var field2 = $("input[type='radio'][name='qs2']:checked").val();
                var field3 = $('#feed').val();

                $.ajax({
                    url: "https://docs.google.com/forms/d/1jkIpSFH16SiNlsj13cBBRsuoiXmqeGVAI6PttCQiff8/formResponse",
                    data: {"entry.1023121230": field3, "entry.1230072460": field1, "entry.2113237615": field2},
                    type: "POST",
                    dataType: "xml",
                    statusCode: {
                        0: function() {
                            //Success message
                        },
                        200: function() {
                            //Success Message
                        }
                    }
                });
            }

            $(document).ready(function(){
                $('#form').submit(function() {
                    postToGoogle();
                    return false;
                });
            });
        </script>
    </body>
</html>

0 个答案:

没有答案