javascript - <input onblur="value=100">Why can the value here be obtained directly?
我想大声告诉你
我想大声告诉你 2017-05-18 10:53:16
0
1
457

You cannot write like this in js. How do you write it in js file?

我想大声告诉你
我想大声告诉你

reply all(1)
阿神

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>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template