User:Davidboo25/common.js: Difference between revisions
From Melvor Idle
Davidboo25 (talk | contribs) No edit summary |
Davidboo25 (talk | contribs) No edit summary |
||
Line 1: | Line 1: | ||
$(function () { | $(function () | ||
{ | |||
var myElement = document.getElementById('calculatorTest'); | var myElement = document.getElementById('calculatorTest'); | ||
var code ='<input type="number" min="0" oninput="validity.valid||(value='');" class="number_input" id=Ranged value="" enabled />'; | |||
code = code.replace(/"/g, '\\"'); | |||
code = code.replace(/'/g, '\\''); | |||
myElement.innerHTML = code | |||
}()); | }()); |
Revision as of 04:13, 2 April 2021
$(function ()
{
var myElement = document.getElementById('calculatorTest');
var code ='<input type="number" min="0" oninput="validity.valid||(value='');" class="number_input" id=Ranged value="" enabled />';
code = code.replace(/"/g, '\\"');
code = code.replace(/'/g, '\\'');
myElement.innerHTML = code
}());