Sunday 6 October 2019

javascript - How to replace innerHTML of a div using jQuery?



How could I achieve the following:




document.all.regTitle.innerHTML = 'Hello World';


Using jQuery where regTitle is my div ID?


Answer



$("#regTitle").html("Hello World");

No comments:

Post a Comment

php - file_get_contents shows unexpected output while reading a file

I want to output an inline jpg image as a base64 encoded string, however when I do this : $contents = file_get_contents($filename); print &q...