JSFiddle - React, Tailwind, and code Playground
HTML
<p>Click the button to remove a substring in the paragraph below:</p>
<p id="demo">jquery12325365345423545423this string starts with a code</p>
<button onclick="myFunction()">Try it</button>
<script>
var alreadyDone = false;
function myFunction()
{
if(!alreadyDone)
{
alreadyDone=true;
var str=document.getElementById("demo").innerHTML;
var n=str.substring(26);
document.getElementById("demo").innerHTML=n;
}
}
</script>