1

index.php

    <head>
        <script>
            function getpage(pageName) {
                var obj = new ActiveXObject("msxml2.xmlhttp");
                obj.open("GET", pageName);
                obj.send('A=1&B=2&C=3');
                var txt = obj.responseText;             
                myText.value += txt;
            }
        </script>
    </head>
    <body>
        <input type="text" id="myText"/>
        <input type="button" onclick='getpage("http://localhost/Last/callPageForIE/info.php")';/>
    </body>
</html>

info.php

<?php
    $A = $_GET['A'];
    $B = $_GET['B'];
    $C = $_GET['C'];

    $sum = $A + $B + $C;
    echo "your sumuatsdion is ".$sum;
?>

info.php から結果を取得しようとしましたが、常にゼロになる理由がわかりません。どこが間違っているのか教えてもらえますか?

4

1 に答える 1