How to add View_id dynamically using js function

Example: For the below, the input field needs a View_id.