I have the following value 'testValue' in my javascript file
$('#testValue').val(RestServices.getValueCovid(response, 'TESTVALUE'));
In the html file I have
<input name="testValue" id="testValue" />
This works and displays the value on the webpage but it is in an input box.
I want to display it just as plain text using <p> <span> <div> or whatever you suggest. The browser is IE8. I have tried getElementById and a few other ways but not working. Any suggestions welcome
First create your page element, for example:
Then set the text of that element much in the same way you set the value of the
<input>:A couple notes:
iddoesn't have to be what I specified here, it just has to be unique. If you're getting rid of the<input>element then you can re-use the sameidto make it simpler.RestServicestwice, just fetch it once and store it in a variable. Then use that variable to populate the two elements.