Home > Backend Development > PHP Tutorial > 用什么函数往接受返回值

用什么函数往接受返回值

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-06-13 12:16:40
Original
937 people have browsed it

用什么函数去接受返回值
有一个API,需要用表单pos到一个地址,然后获取返回的数据。

	<form action="https://dnsapi.cn/Record.List" method="post"><br />		<input type="text" value="登陆邮箱地址" name="login_email"><br />		<input type="passwd" value="登陆密码" name="login_password"><br />		<input type="text" value="ID" name="format"><br />		<input type="submit"><br />	<br />	<form>	
Copy after login


这个我点击提交以后就会链接到 上面的API地址,如何把API地址返回的值直接显示在本页面呢,谢谢
------解决思路----------------------
你可以使用jquery的ajax函数来实现, 文档在这是http://api.jquery.com/jQuery.ajax/
------解决思路----------------------
$.ajax({
type: "POST",
url:"https://dnsapi.cn/Record.List",
data: $("#formid").serialize(),
success: function(data){
   alert(data);
}
});

Related labels:
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