作业提交
来源:1-9 编程练习
 
			慕村1994845
2020-07-18 16:11:00
<!DOCTYPE html>
<html>
    <head>
    <meta charset="UTF-8">
    <title>输入框</title>
</head>
<body>
<input type="button" value="删除" id="input" />
<script type="text/javascript">
//补充代码
var input=document.getElementById("input");
input.onclick=function(){
    var result=confirm("确认要删除吗?");
    if(result){
        input.style.color="red";
    }else{
        input.style.color="green";
    }
}
</script>
</body>
</html>1回答
同学你好,代码是正确的。继续加油,祝学习愉快!