You cannot write like this in js. How do you write it in js file?
Use this to transfer the control to js.
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>index</title> </head> <body> <input type="text" name="text" id="test" value="" onblur="a(this)"/> <button onclick="init()">123333</button> </body> <script> function init(){ document.getElementById("test").value = ''; } function a(text){ text.value = 100; } </script> </html>
Use this to transfer the control to js.