首页
极刻
圈子
教程
开源
登录 / 注册
返回教程:Javascript 参考手册
TRY RUN / 在线示例
Javascript 参考手册 尝试一下
Javascript 参考手册 尝试一下
源代码
运行
<!DOCTYPE html> <html> <body> <form> Get Image:<input type="file" id="imgfile"> </form> <p>Click the button below to disable the FileUpload button above.</p> <button onclick="disableElement()">Disable FileUpload</button> <script> function disableElement() { document.getElementById("imgfile").disabled=true; } </script> </body> </html>
运行结果