VanillaJS Form serialize() Favorite animal: Brine shrimp Red panda Spider monkey Cancel Confirm Array.from(document.querySelector('form')).map(item=>item.name?`${item.name}=${item.value}`:null).filter(item=>!!item).join('&') // "favAnimal=&animallName=Tiger" lang/js 2019.12.16