私はphpでajaxリクエストを送信しています。フォーム メソッドでは、次のコードを使用します。
rohit1.php
<form action="index1.php" onsubmit="callfunc()">
<span id="raj"></span>
<input type="submit" value="submit"></div>
</FORM>
javascript im使用:callfun.js
function callfunc()
{
var http =new XMLHttpRequest();
var name=prompt('enter name of the form');
var name="rohit";
var url = "index1.php";
var s = document.getElementById('raj').innerHTML;
alert(http);
http.open("POST", "index1.php?name="+name, true);
http.onreadystatechange = function()
{
if(http.readyState == 4 && http.status == 200)
{
}
}
http.send();
}
この機能を使用しているとき。次に、送信時に、これは index.php?name= の代わりに index.php?label= にリダイレクトされます。これにはどうすればよいですか???