【iframe式ajax调用示例】教程文章相关的互联网学习教程文章

2018-10-04-Python全栈开发-day62.Iframe,Formdata,Ajax【代码】

多种方式实现ajax效果 1.不依赖jquery,使用XMLHttprequest<div><a onclick="func1()">dianwo</a><a class="btn" onclick="func1();">点我</a> </div> <script>function func1() {var xml1=new XMLHttpRequest();xml1.onreadystatechange=function(){if(xml1.readyState==4){console.log(xml1.responseText)}};xml1.open(GET,/xml/);xml1.send(hello)}</script>def index(request):return render(request,index.html) def xml(requ...