Open developerasun opened 2 years ago
const checkout = document.getElementById('checkout') as HTMLSelectElement
const selected = checkout.options[checkout.selectedIndex].value
An important note for sending Files with Fetch API : One needs to omit content-type header for the Fetch request. Then the browser will automatically add the Content type header including the Form Boundary which looks like,
Content-Type: multipart/form-data; boundary=—-WebKitFormBoundaryfgtsKTYLsT7PNUVD
research : understanding HTML drowndown
select and option
see code examples
input type file
see code examples
get multiple files
reference