2024年1月10日 星期三

Arduino HTML 按鈕超連結

參考

https://sites.google.com/view/rayarduino/esp32-web-server_two_leds 



<HTML>

<HEAD>

<TITLE>語法練習版</TITLE>

</HEAD>

<BODY>


<input type="button" value="ON" style="width:120px;height:40px;font-size:20px;background-color:green;"  onclick="location.href='你要前往的網址'">

<input type="button" value="OFF" style="width:120px;height:40px;font-size:20px;background-color:red;"  onclick="location.href='你要前往的網址'">


</BODY>

</HTML>

這段不知怎融合Arduino

------------------------------------------------------------------------------------------------------------

Arduino可用 參考連結融合

  client.print(F("&nbsp;"));
  client.print(F(" <p><a href=\"/192.168.179.146/IRon\">"));
  client.print(F(" <button class=\"button\"  style=\"width:360px;height:120px;font-size:40px;background-color:green;\" >ON</button></a> "));
  client.print(F(" <a href=\"/192.168.179.146/IRoff\">"));
  client.print(F(" <button class=\"button\"  style=\"width:360px;height:120px;font-size:40px;background-color:red;\" >OFF</button></a></p> "));



沒有留言:

張貼留言

GOOGLE不小心按了改成韓文,改變語言設定

  好奇點了上面的其他語言版本,結果搞了一會才改回中文,提供修改流程給需要的人