Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width">
  <title>JS Bin</title>
</head>
<body>
  <input type='text' id='text_1' />
</body>
</html>
 
add_placeholder('text_1', 'Fuck you ie')
function add_placeholder(id, placeholder) {
    var el = document.getElementById(id);
    el.placeholder = placeholder;
    el.onfocus = function () {
        if (this.value == this.placeholder) {
            this.value = '';
          el.style.color = '';
        }
    };
    el.onblur = function () {
        if (this.value.length == 0) {
            this.value = this.placeholder;
          el.style.color = '#A9A9A9';
        }
    };
    el.onblur();
}
Output

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

Dismiss x
public
Bin info
anonymouspro
0viewers