A few lines shouldn't be much of an issue, you could recognize the patterns, # in this case means that you'll use document.getElementById
, .html()
is obviously replaced by .innerHTML
, so for this specific line:
let val = document.getElementById('name').innerHTML;
And of course, if you wish to assign a value to this variable, it's just a variable and no longer a function argument in jQuery:
document.getElementById('name').innerHTML = 'new value';
With a lot of lines in change, you might wanna consider using an AI model, they're pretty good at these basic changes, however always read the modified code, do not just copy and paste it because it's not uncommon for critical security vulnerabilities to be introduced. Use with caution.