Skip to content

Instantly share code, notes, and snippets.

@harshmishra2028-lab
Forked from isdaviddong/index.html
Created February 8, 2026 00:43
Show Gist options
  • Select an option

  • Save harshmishra2028-lab/1d63b362ed7dc7dcb97a1141cf68776f to your computer and use it in GitHub Desktop.

Select an option

Save harshmishra2028-lab/1d63b362ed7dc7dcb97a1141cf68776f to your computer and use it in GitHub Desktop.
<!DOCTYPE html>
<html>
<head>
<title></title>
<meta charset="utf-8" />
<script src="Scripts/jquery-1.9.1.min.js"></script>
<link href="Content/bootstrap.min.css" rel="stylesheet" />
<script src="Scripts/isRockFx.js"></script>
<script>
$(function () {
$('#ButtonCal').click(
function () {
//取得用戶輸入的參數
var para = { 'height': $('#txbHeight').val(), 'weight': $('#txbWeight').val() };
//呼叫API
ExecuteAPI('Example', 'BMI', para,
//呼叫WebAPI成功時運行的Call Back Function
function (result) {
alert(result.Data);
}
);
}
);
});
</script>
</head>
<body>
<div class="row" style="margin:10px">
<div class="col-md-12">
<div class="form-group">
身高:
<input id="txbHeight" class="form-control" placeholder="請輸入身高" />
體重:
<input id="txbWeight" class="form-control" placeholder="請輸入體重" />
<br />
<button class="btn btn-primary" id="ButtonCal">計算</button>
</div>
</div>
</div>
</body>
</html>
@harshmishra2028-lab
Copy link
Author

@harshmishra2028-lab
Copy link
Author

@harshmishra2028-lab
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment