1
0
mirror of https://github.com/Adam-Ant/MQTT-nRF24-Bridge synced 2024-12-20 07:34:35 +00:00
MQTT-nRF24-Bridge/data/index.html

41 lines
1.1 KiB
HTML
Raw Permalink Normal View History

<html>
<head>
<title>ESP8266 Input Example</title>
<style>
body {
background-color: #E6E6FA;
font-family: Arial, Helvetica, Sans-Serif;
Color: blue;
}
</style>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script type="text/javascript">
var counter = 1;
function addInput(tableName){
var newrow = document.createElement('tr');
newrow.innerHTML = "<td><input type='text' name='mqtt" + counter + "'></td><td><input type='text' name='node" + counter + "'></td>"
document.getElementById(tableName).appendChild(newrow);
counter++;
}
</script>
</head>
<body>
<h1><br>ESP8266 Server - Getting input from a client</h1>
2018-01-29 16:06:28 +00:00
<form action='/post' method='POST'>
<table id='dynamicInput'>
<tr>
<th>MQTT Address</th>
<th>Node ID</th>
</tr>
<tr><td><input type='text' name='mqtt0'></td><td><input type='text' name='node0'></td></tr>
</table>
<input type='submit' value='Enter'> <input type="button" value="Add another text input" onClick="addInput('dynamicInput');">
</form>
</body>
</html>