这是我的页面HTML代码 . 我在这里使用过JQuery . ESP8266 LED控制
Toggle Pin 11
Toggle Pin 12
Toggle Pin 13
$(document).ready(function(){
$(".led").click(function(){
var p = $(this).attr('id'); // get id value (i.e. pin13, pin12, or pin11)
// send HTTP GET request to the IP address with the parameter "pin" and value "p", then execute the function
alert("Sending Get Request");
$.get("http://192.168.4.1:80/", {pin:p}); // execute get request
});
});