on a webpage there is a "show more" button when I click inspect element appears
<input name="" id="" onclick="GetComments();" class="showMore showMoreNew" value=" المزيد" type="submit">
I want to click it using JavaScript
on a webpage there is a "show more" button when I click inspect element appears
<input name="" id="" onclick="GetComments();" class="showMore showMoreNew" value=" المزيد" type="submit">
I want to click it using JavaScript
I used
document.getElementsByClassName("showMoreNew")[0].click();
and it works.
JQuery solution not work under certain condition, below solution always works.
document.getElementById("xxx").click();