Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<!DOCTYPE html>
<html>
<head>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/2.0.2/jquery.min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.3/angular.min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.3/angular-route.min.js"></script>
<meta charset=utf-8 />
<title>JS Bin</title>
</head>
<body>
<input class="draft" id="input1" type="text"/> 
<button class="send" id="sendbutton" disabled>Send</button> 
<ul class="messages">
</ul>
</body>
</html>
 
var input1 = document.getElementById('input1'),
    sendbutton = document.getElementById('sendbutton');
function IsEmpty(){ 
  if (input1.value){
    sendbutton.removeAttribute('disabled');
  } else {
    sendbutton.addAttribute('disabled', '');
  }
}
input1.onkeyup = IsEmpty;
Output

You can jump to the latest bin by adding /latest to your URL

Dismiss x
public
Bin info
anonymouspro
0viewers