I've got this php code that works perfectly:
preg_match_all(
'/<div style="display:block; float:left; height:240px; width:150px;'
. ' text-align:center; margin:5px; overflow:hidden;">.*?'
. '<span class="card-text">(.*?)'
. '<span class="instruction">\((.*?)\)<\/span>/s',
$html,
$students,
PREG_SET_ORDER
);
foreach($students as $student) {
echo($student[1].",".$student[2]."<br />");
}
How would I do this in javascript? Thanks!
document.getElementByIdandparent.getElementsByTagNamethen loop through those results.