我想使用一个函数向用户提出一系列问题
<input type="text" id="input">
Run Code Online (Sandbox Code Playgroud)
在 C 中,scanf() 函数允许您等待用户响应,并在用户输入值时继续。在JavaScript中,如何在不使用prompt()的情况下在函数中等待用户响应?
小智 -1
可以在js中使用onChange。
$(document).on('change','#input',function(e){
e.preventDefault
});
Run Code Online (Sandbox Code Playgroud)