因為代碼要燒錄到單片機內,體積上盡量不要超過1024KByte。
網頁上有多個Button,每個Button向服務器發送一個字串指令。
以下代碼在 Firefox for Win10 和 Firefox for Android 上可以正常使用,服務器可以收到POST請求并回復。
但是為什么在 Firefox for IOS 上無法正常使用(包括iphone和iPad),服務器收不到POST請求。
<html>
<head>
<title>T</title>
</head>
<style type = "text/css">
.button
{
//...........
}
</style>
<body>
<center>
<input type = "button" class = "button" onclick = fnF("1") value=https://bbs.csdn.net/topics/ "- Open -" />
//...........
</center>
</body>
<script>
function fnF(str)
{
var req = new XMLHttpRequest();
req.onreadystatechange = function()
{
if(req.readyState===4 && req.status===200)
{
alert("OK !");
}
return;
};
req.open("POST",str);
req.send();
}
</script>
</html>
轉載請註明出處,本文鏈接:https://www.uj5u.com/qianduan/273085.html
標籤:HTML(CSS)
上一篇:圖片根據時間自動切換代碼問題
