你能告诉我怎样才能实现这个目标
$(document).ready(function(){
id = "user";
$( '#login' ).html( "<a href = http://localhost/Misc/Receive.php?
id=+id>Test </a>" );
Receive.php $ val = $ _GET ['id'];
echo($val);
想要将存储在变量id中的值传递给receive.php
答案 0 :(得分:2)
报价不正确,请将您的字符串更改为:
$( '#login' ).html( "<a href = http://localhost/Misc/Receive.php?id="+id+">Test </a>" );