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>
  <p>enter *num*.*num.*num*</p>  
  <input type="number" id="price">
  <button id="get-value">Get Value</button>
  <p>Value: <span id="val"></span></p>
</body>
</html>
 
/* jshint esnext: true */ 
document.addEventListener("DOMContentLoaded", () => {
  const button = document.getElementById('get-value');
  const input = document.getElementById('price');
  const span = document.getElementById('val');
  button.onclick = () => span.innerHTML = input.value;
});
Output

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

Dismiss x
public
Bin info
anonymouspro
0viewers