Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <p class="rowBox">
- <label>Text box</label>
- <input type="text"
- id="myText"
- value="text here" /> <--- want to insert local storage to replace "text here"
- </p>
- javascript file containing this:
- function getFirstRow() {
- let firstRow = Number(JSON.parse((<HTMLInputElement>document.getElementById('myText')).value)) + 3;
- if (isNaN(firstRow) || firstRow > rowCount || firstRow < 4 || firstRow == undefined || firstRow == null || firstRow > rowCount || !(typeof firstRow === 'number' && (firstRow % 1) === 0)) {
- return '3:';
- } else {
- localStorage.startRow = JSON.stringify(firstRow);
- return firstRow + ':';
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement