Compare commits
2 Commits
4e2a7dd1a2
...
2bffcdd9e7
Author | SHA1 | Date | |
---|---|---|---|
2bffcdd9e7 | |||
a3bd1787dc |
@ -42,26 +42,29 @@
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<script>
|
||||
$('#drug').on('change', function () {
|
||||
check();
|
||||
});
|
||||
$('#count').on('change', function () {
|
||||
check();
|
||||
});
|
||||
|
||||
function check() {
|
||||
var count = $('#count').val();
|
||||
var drug = $('#drug').val();
|
||||
if (count && drug) {
|
||||
$.ajax({
|
||||
method: "POST",
|
||||
url: "/Home/Calc",
|
||||
data: { count: count, drug: drug },
|
||||
success: function (result) {
|
||||
$("#sum").val(result);
|
||||
}
|
||||
@section Scripts
|
||||
{
|
||||
<script>
|
||||
$('#drug').on('change', function () {
|
||||
check();
|
||||
});
|
||||
};
|
||||
}
|
||||
</script>
|
||||
$('#count').on('change', function () {
|
||||
check();
|
||||
});
|
||||
|
||||
function check() {
|
||||
var count = $('#count').val();
|
||||
var drug = $('#drug').val();
|
||||
if (count && drug) {
|
||||
$.ajax({
|
||||
method: "POST",
|
||||
url: "/Home/Calc",
|
||||
data: { count: count, drug: drug },
|
||||
success: function (result) {
|
||||
$("#sum").val(result);
|
||||
}
|
||||
});
|
||||
};
|
||||
}
|
||||
</script>
|
||||
}
|
Loading…
Reference in New Issue
Block a user