this variable is undefined outside the function()
i want this variable work outside function() and I want this variable to change every time I choose the selected option
code :
<script type="text/javascript">
   var interval_day;
   $('#select_id').change(function(){
      interval_day = $('#select_id').val();
   });
   document.getElementById('etst').innerHTML = interval_day;
<script>
html code :
 <select id="select_id">
     <option value="1">One</option>
     <option value="2">Two</option>
 </select>
please help me for this..
 
     
    