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>
<div id="rizvi">
  <input type="textbox" id="Tue" />
  <input type="textbox" id="Wed" />
  <input type="textbox" id="Thu" />
  <input type="textbox" id="Sat" />
  </div>
</body>
</html>
 
var textbox = document.getElementById('Tue');
textbox.value = ("00000000" + "12345678").slice(-8);
var textbox1 = document.getElementById('Wed');
textbox1.value = parseInt("010", 10);
var textbox2 = document.getElementById('Thu');
textbox2.value = parseInt("00010101", 10);
var textbox3 = document.getElementById('Sat');
var str = "000000000000000034566789900233";       // string
var number = str*1;   // number
textbox3.value = number;
Output

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

Dismiss x
public
Bin info
anonymouspro
0viewers