$(document).ready(function(){ $("#butti").click(function(){ document.getElementById('switching_point').value = '5'; }); });