php isset $ _SESSION等效于JS

时间:2017-03-22 01:29:57

标签: php jquery session

我在php中有这段代码:

<form method="POST">
1: <input type="radio" name="person" value="1" /><br />
2: <input type="radio" name="person" value="2" /><br />
<input name="submit" type="submit" value="Submit">
</form> 

<?php
    function ratePerson($person) {
     $_variable1 = 1400;
     $_variable1+=1;
     return($_variable1);
     }

    if (isset($_POST['submit'])) {    
        $person = $_POST['person'];
        echo "Person: " . $person . "<br />";
        $_variable1 = ratePerson($person);
        echo "Variable1: " . $_variable1 . "<br />";
    }
?>

我想知道如何在JS / Jquery中重写它。有没有办法在JS / Jquery中执行这个类似的过程?

0 个答案:

没有答案