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

WBOY
Release: 2016-06-06 20:07:42
Original
1068 people have browsed it

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

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

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

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

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

回复内容:

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

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

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

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

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

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

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

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template