亚洲在线久爱草,狠狠天天香蕉网,天天搞日日干久草,伊人亚洲日本欧美

為了賬號安全,請及時綁定郵箱和手機立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

simpleResponse.xml 文件里面要怎么寫 ?為什么警告框跳不出來?

simpleResponse.xml 文件里面要怎么寫 ?為什么警告框跳不出來?

PHP
慕婉清6462132 2023-04-26 19:15:22
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><script type="text/javascript">var xmlHttp;function createXMLHttpRequest() { if(window.ActiveXObject) { xmlHttp = new ActiveXObject("Microsoft.XMLHTTP"); } else if(window.XMLHttpRequest) { xmlHttp = new XMLHttpRequest(); } }function startRequest() { createXMLHttpRequest(); xmlHttp.onreadystatechange = handleStateChange; xmlHttp.open("GET","simpleResponse.xml",true); xmlHttp.send(null); }function handleStateChange() { if(xmlHttp.readyState == 4) { if(xmlHttp.state == 200) { alert("The server replied with: " + xmlHttp.responseText); } } }</script></head><body> <form action="#"> <input type="button" value="Start Basic Asynchronous Request" onclick="startRequest()" /> </form></body></html>
查看完整描述

2 回答

?
肥皂起泡泡

TA貢獻1829條經驗 獲得超6個贊

simpleResponse.xml 和這個 html 在同一路徑下 ... 無所謂什么內容~

查看完整回答
反對 回復 2023-04-29
?
Cats萌萌

TA貢獻1805條經驗 獲得超9個贊

simpleResponse.xml 這個文件在你測試的時候可以隨便寫點內容進去,比如"hello world!";
但真正的xml文件格式應該是像這樣的

<?xml version="1.0" encoding="ISO-8859-1"?><!--  Copyright w3school.com.cn --><note>
	<to>George</to>
	<from>John</from>
	<heading>Reminder</heading>
	<body>Don't forget the meeting!</body></note>


查看完整回答
反對 回復 2023-04-29
  • 2 回答
  • 0 關注
  • 157 瀏覽

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯系客服咨詢優惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號