从javascript到PHP的值

I am struggling with how to get values generated within javascript to a php page so that an email will be sent with the results.

function sendmemail(){

        var data = 'result=' + result.val();

$.ajax({

            url: "process.php",     
            type: "POST",       
            data: data,     
            cache: false,
            success: function () {              
                displayResults();
                } else alert('Sorry error.');               
            });     
        }
查看全部
weixin_33695450
weixin_33695450
2011/09/20 14:15
  • php
  • ajax
  • javascript
  • 点赞
  • 收藏
  • 回答
    私信

5个回复