Error 400,api error

please tell me why is this code not working when I am submitting my form data?
error image has been attached

you should define function with function keyword… you just type below code inside script tag

function input(){
var inp = document.getElementById(‘input’).value;

thanks its working but after i submit my result the sound starts coming from buzzer but the same error page came again although sound was coming continuously throughout. then i have to start the view device page once again and then press off button.can it be solved?please help.

Make sure you enabled API key…

yeah i have enabled thats why its working for the first time

<!doctype html>
    <title>Control Buzzer</title>
    <script type="text/javascript" src=""></script>
<body bgcolor="slateblue">
        <button id="on" onclick="digitalWrite(0,'HIGH');">ON</button>
        <button id="off" onclick="digitalWrite(0,'LOW');">OFF</button>

Try With this code…