We have moved our forum to GitHub Discussions. For questions about Phalcon v3/v4/v5 you can visit here and for Phalcon v6 here.

Ajax Token

How do I send a token by ajax ?



27.0k
  • //phalcon ajax
  • $.ajax({
  • url: "/smscode",
  • type: "post",
  • data: {'phone':phonenum},
  • dataType:'json',
  • //contentType: "application/json",
  • success: function(json){
  • var uu=json.max;//必须这样取值啊
  • if(uu==9){
  • countDown(io);
  • }else{
  • //alert('获取验证码过于频繁,请等等再试');
  • }
  • }
  • });
  • //smscode $this->view->disable();