javascript - setting/getting/checking multiple cookies generated by user-input (textboxes) in one go -
i'm bashing head against wall , hoping can help. i've got include 3 text boxes users enter values following cookies: name, city, , hobby. need use single button onclick event call function create 3 cookies (with values). need further function check existence of each cookie when page accessed. if 1 or more of cookies not set, alert box should notify user set unset cookie(s). if 3 cookies set, alert box should display contents of each cookie. where hung (i think) on how pass value textbox , corresponding key arguments generic setcookie function. w3schools gives code template creating, getting , checking cookies (below) i've no idea how implement setting cookies via user-input or setting 3 @ once! thick brick, seems. my html textboxes , submit button: please enter name: <input type = "text" name = "name" id = "name"> <br> please enter city: <input type = "text" name = "city" id = ...