Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<!DOCTYPE html>
<html>
<head>
<meta charset=utf-8 />
<title>JS Bin</title>
</head>
<body>
  <input id="elem" maxlength="4" style="display: none;">
  <button id="toggle">Click me</button>
</body>
</html>
 
document.getElementById( "toggle" ).addEventListener( "click", function( event ) {
  var elem = document.getElementById( "elem" );
  elem.maxLength = 10;
  elem.style.display = "";
});
Output

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

Dismiss x
public
Bin info
anonymouspro
0viewers