Passing javascript value to PHP

前端 未结 3 1282
独厮守ぢ
独厮守ぢ 2020-12-21 21:10

I am quite new as web developer, I find myself trying to resolve a problem.

I would like to pass a value JavaScript to PHP without using any form method.

Her

3条回答
  •  心在旅途
    2020-12-21 21:44

    You need to send a request which hold your data you can use AJAX as mentioned in comment.

    Here JQuery ajax example :

    $.ajax({
      url: "test.html",
      context: document.body
    }).done(function() {
      // Available informations
    });
    

提交回复
热议问题