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>
<form action="#">
  <input type="text" id="text" value="http://www.baidu.com">
  <input type="submit" id="btn" value="提交">
</form>
</body>
</html>
 
var text = document.getElementById('text');
var btn = document.getElementById('btn');
btn.onclick = function(){
  alert(text.value.replace(/\./g, '#'));
};
Output

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

Dismiss x
public
Bin info
oodzchenpro
0viewers