phpの変数をjavascriptに受け渡す方法

shiitake_sshiitake_s のブックマーク 2011/12/12 01:55

その他

このブックマークにはスターがありません。
最初のスターをつけてみよう!

トップページ/コンテンツ/プログラミング入門/Ajax入門/PHP-JavaScript通信/通信パターン2 - suffix@wiki

    /*sample.php*/ <html> <head> <?php $a = "apple"; $t = "test"; ?> <script> var a ="<?=$a?>"; </script> <script src="sample.js"> </head> <body> </body> </html> /*sample.js*/ alert(a); //javascriptと...

    \ コメントが サクサク読める アプリです /

    • App Storeからダウンロード
    • Google Playで手に入れよう