在按钮上单击ajax不起作用任何人都可以帮助我 [英] On button click ajax is not working can anyone help me

查看:66
本文介绍了在按钮上单击ajax不起作用任何人都可以帮助我的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

onclick ajax调用无效我无法找到错误请帮我一个相当新的ajax jquery

onclick ajax call is not working i am not able to find the mistake please help me an quite new to the ajax jquery

推荐答案

你为什么用e?的preventDefault();在点击事件的开始。记住
Why are you using e.preventDefault(); in the start of click event. Remember
e.preventDefault();



始终阻止浏览器停止执行特定事件的以下行。



将代码更改为:




always prevents the browser to stop executing the below lines of a specific event.

Change the code to:


#submit-btn)。on( 点击 function (e){
("#submit-btn").on("click",function(e) {


.ajax({
url: https://ivr.callxl。 com / callXLWeb / SendingEmail
类型: POST
contentType: application / json; charset = utf-8
data : comment = +
.ajax({ url: "https://ivr.callxl.com/callXLWeb/SendingEmail", type: "POST", contentType: "application/json; charset=utf-8", data: "comment="+


这篇关于在按钮上单击ajax不起作用任何人都可以帮助我的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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