JSFiddle - React, Tailwind, and code Playground

by shahrukh007

HTML

<html>
<head>
<body>
<select id ="car">
<option value="shahruk">shahrukh</option>
<option value="khan">khan</option>
<option value="age">age</option>
</select>
<button type="button"  onclick="myFunction(event)">click me</button>
<script>
function myFunction(e){
var x =document.getElementById("car").value;
console.log(x);
}
</script>
</body>
</head>
</html>