javascript onfocus练习代码


<html>
<meta charset="UTF-8">
<head>
head>
<body>
<input type="text" id="input1" onfocus="onload_1(this)">
<script>
    function onload_1(obj) {
      
        obj.style.background = "red"
    }
script>
body>
html>

你可能感兴趣的:(JavaScript,javascript)