点击一个按钮后,使按钮变灰(不可能点)

<%@ page language=”java” contentType=”text/html; charset=UTF-8″

    pageEncoding=”UTF-8″%>

<!DOCTYPE html PUBLIC “-//W3C//DTD HTML 4.01 Transitional//EN” “http://www.w3.org/TR/html4/loose.dtd”>

<html>

<head>

<meta http-equiv=”Content-Type” content=”text/html; charset=UTF-8″>

<script type=”text/javascript” src=”${pageContext.request.contextPath}/editor/jquery/jquery-1.4.4.min.js”></script>

<title>按钮变灰(不可点击)</title>

<script type=”text/javascript”>

    function upload(obj){

        document.getElementById(obj).disabled = true;

    }

</script>

</head>

<body>

    <div>

        <input type=”button” id=”bt” value=”上传” οnclick=”upload(‘bt’)” />

    </div>

</body>

</html>

主要是把disable属性,disable=”false”表示按钮可点击,disable=”true”表示按钮不可点击

    原文作者:流线
    原文地址: https://blog.csdn.net/u011933840/article/details/26556195
    本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系博主进行删除。
点赞