Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var ts=document.getElementById("ts");
- var newNR=document.getElementById('NR').value;
- var sb=document.getElementById('subit');
- document.write("1");
- sb.type = "button";
- document.write("2");
- document.write("3");
- sb.onclick=function () {
- document.write("dsa");
- document.write(newNR);
- var storedNR = localStorage.getItem("sNR");
- document.write("5");
- if (storedNR==null) {
- document.write("6");
- var newstoredNR=[];
- document.write("6");
- newstoredNR.push(newNR);
- document.write("6");
- localStorage.setItem("sNR", JSON.stringify(newstoredNR));
- document.write("7");
- } else {
- var oldstoredNR = JSON.parse(storedNR);
- document.write(oldstoredNR);
- oldstoredNR.push(newNR);
- document.write("8");
- localStorage.setItem("sNR", JSON.stringify(oldstoredNR));
- document.write("8");
- }
- document.write("9");
- newNR.value="zlodziejski numer";
- document.write("9");
- ts.submit();
- return true;
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement