My task is to convert jquery to es6 . I am stuck at one point .
Jquery -
var $form = $('.class1');
commonfunction($form);
function commonfunction($form) {
$form.find('.class2')
}
ES6 which i am working , i am trying like this .
let form = document.querySelector('.class1');
commonfunction(form);
function commonfunction($form) {
form.find('.class2')
}
I know that find is not supported by raw javascript .How to proceed here ?
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.