Javascript to download file
Use javascript to download file
by Hao Wu
HTML
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css">
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"></script>
<script src="https://code.jquery.com/jquery-2.2.0.min.js"></script>
<div class="btn-group" data-toggle="buttons">
<label class="btn btn-lg btn-success active">
<input type="radio" name="options" id="option1" autocomplete="off" checked />
<span class="glyphicon glyphicon-unchecked unchecked"></span>
<span class="glyphicon glyphicon-check checked"></span>
簽到+
</label>
<label class="btn btn-lg btn-danger">
<input type="radio" name="options" id="option2" autocomplete="off" />
<span class="glyphicon glyphicon-unchecked unchecked"></span>
<span class="glyphicon glyphicon-check checked"></span>
簽退-
</label>
</div>
CSS
/* Latest compiled and minified CSS included as External Resource*/
/* Optional theme */
/* @import url('//netdna.bootstrapcdn.com/bootstrap/3.0.0/css/bootstrap-theme.min.css'); */
body {
margin: 10px;
}
.checked{
display:none;
}
.active .checked {
display:inline-block;
}
.active .unchecked {
display:none;
}
JavaScript
/* Latest compiled and minified JavaScript included as External Resource */