Home  >  Article  >  Backend Development  >  JavaScript AJAX怎么这样写不行,好奇怪呀!

JavaScript AJAX怎么这样写不行,好奇怪呀!

WBOY
WBOYOriginal
2016-06-06 20:07:421027browse

这样写的话,服务器收不到:

<code>xmlhttp.open("POST", "03.php" ,true);//收不到!</code>

但是这样写,服务器就收到了,为什么呢?

<code>var url="03.php"; //这样就行,好奇怪!

xmlhttp.open("POST", url ,true);</code>

回复内容:

这样写的话,服务器收不到:

<code>xmlhttp.open("POST", "03.php" ,true);//收不到!</code>

但是这样写,服务器就收到了,为什么呢?

<code>var url="03.php"; //这样就行,好奇怪!

xmlhttp.open("POST", url ,true);</code>

光有这些代码看不出哪里错了

js这两种的写法基本上是一样的啊

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn