document.getElementById('Id')
document.getElementsByName('name')
document.getElementsByClassName('className')
document.getElementsByTagName('input')
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title></title>
</head>
<body>
<input type="button" name="btnShow" id="btnShow" value="显示" />
<script>//如果不用事件的话,js必须放在元素的后面才能访问到元素
var btn = document.getElementById('btnShow');
btn.value = '显示时间';
</script>
</body>
</html>