I use bootstrap and I want to display my value of button in textbox when I clicked it and my textbox show my value of button but its value doesn't remain and textbox become empty early
<input type="submit" value="5000t "class="btn btn-lg btn-block btn-danger" id="btn1" onclick="myf()" >
<input type="text" class="form-control" id="txt" name="txt">
function myf() {
var txt = document.getElementById('txt');
var btn1 = document.getElementById('btn1');
txt.value = btn1.value;
}
submittriggers apostbackwhich reloads the page, after which yourtextboxis empty again.