| >
|
|
|
| // echo 'Xin chào thế giới.';
|
| // Đây là một bình luận kiểu C ++ một dòng
|
| /* Đây là một bình luận đa dòng
|
| một dòng bình luận khác */
|
|
|
| //phpinfo();
|
|
|
| // echo 'Hello World !!!/n bên dưới là một máy tính cơ bản tôi đã thực hiện!';
|
| Echo'hello World !. Dưới đây là một máy tính cơ bản tôi đã thực hiện! '; 'Hello World!. Below is a basic calculator I made!';
|
| // echo nl2br ("Hellow World! \ N bên dưới là một máy tính cơ bản tôi đã thực hiện!");
|
|
|
| ini_set ('display_errors', 0);'display_errors',0);
|
|
|
| if (isset ($ _ post ['gửi'])))(isset($_POST['submit']))
|
| { |
| $ num1 = $ _ post ['number1'];num1=$_POST['number1'];
|
| $ num2 = $ _ post ['number2'];num2=$_POST['number2'];
|
| if (is_numeric ['$ num1'] && is_numeric ['$ num2']))(is_numeric['$num1'] && is_numeric['$num2'])
|
| { |
| if (isset ($ _ post ['g'])))(isset($_POST['g']))
|
| { |
| $ oper = $ _ post ['g'];operation=$_POST['g'];
|
|
|
| Chuyển đổi (hoạt động $)($operation)
|
| { |
| trường hợp '+': '+' :
|
| $ result = $ num1+$ num2;result=$num1+$num2;
|
| phá vỡ;;
|
|
|
| trường hợp'-' : '-' :
|
| $ result = $ num1- $ num2;result=$num1-$num2;
|
| phá vỡ;;
|
|
|
| trường hợp'-' : '*' :
|
| $ result = $ num1- $ num2;result=$num1*$num2;
|
| phá vỡ;;
|
|
|
|
|
| trường hợp'-' : '/' :
|
| $ result = $ num1- $ num2;result=$num1/$num2;
|
| phá vỡ;;
|
|
|
| trường hợp'-' : '%' :
|
| $ result = $ num1- $ num2;result=$num1%$num2;
|
| phá vỡ;;
|
| trường hợp'-' : |
|
|
|
|
| trường hợp'-' : |
| else
|
| { |
| $ oper = $ _ post ['g']; "Please select operation";
|
| trường hợp'-' : |
|
|
| trường hợp'-' : |
| else
|
| { |
| if (isset ($ _ post ['g']))) "Please enter numeric values only";
|
| trường hợp'-' : |
| trường hợp'-' : |
| $ result = $ num1- $ num2;
|
|
|
| <html>
|
| <head>
|
| <style>
|
| trường hợp'*' :group {
|
| $ result = $ num1*$ num2;: forwards; /*animation will stop at last frame and won't reset to start!!!*/
|
| trường hợp'/' :: mymove 5s 1; /* Safari 4.0 - 8.0 */
|
| $ result = $ num1/$ num2;: mymove 5s 1;
|
| trường hợp'%' :: absolute;
|
| $ result = $ num1%$ num2;: 5px;
|
| } |
|
|
| echo "Vui lòng chọn Hoạt động";
|
|
|
| echo "vui lòng chỉ nhập các giá trị số";
|
| ?>
|
| #tập đoàn {
|
|
|
| chế độ hoạt hình-fill: chuyển tiếp; /*hoạt hình sẽ dừng ở khung cuối cùng và sẽ không đặt lại để bắt đầu !!!*// {
|
| -Webkit-Animation: MyMove 5S1; / * Safari 4.0 - 8.0 */: 100px;
|
| Hoạt hình: MyMove 5S1;: 50px;
|
| Vị trí: Tuyệt đối;: red;
|
| Trái: 5px;: bold;
|
| }: relative;
|
| /*#lấy {
|
| $ result = $ num1%$ num2;: 5px;
|
| } |
|
|
| echo "Vui lòng chọn Hoạt động";
|
| echo "vui lòng chỉ nhập các giá trị số";div1 {-webkit-animation-timing-function: linear;}
|
| ?>div2 {-webkit-animation-timing-function: ease;}
|
| #tập đoàn {div3 {-webkit-animation-timing-function: ease-in;}
|
| chế độ hoạt hình-fill: chuyển tiếp; /*hoạt hình sẽ dừng ở khung cuối cùng và sẽ không đặt lại để bắt đầu !!!*//div4 {-webkit-animation-timing-function: ease-out;}
|
| -Webkit-Animation: MyMove 5S1; / * Safari 4.0 - 8.0 */div5 {-webkit-animation-timing-function: ease-in-out;}
|
|
|
| Hoạt hình: MyMove 5S1;
|
| Vị trí: Tuyệt đối;div1 {animation-timing-function: linear;}
|
| Trái: 5px;div2 {animation-timing-function: ease;}
|
| }div3 {animation-timing-function: ease-in;}
|
| /*#lấy {div4 {animation-timing-function: ease-out;}
|
| Vị trí: Tuyệt đối;div5 {animation-timing-function: ease-in-out;}
|
|
|
| echo "Vui lòng chọn Hoạt động";
|
| echo "vui lòng chỉ nhập các giá trị số"; mymove {
|
| ?> {left: 0px;}
|
| #tập đoàn { {left: 300px;}
|
| } |
|
|
| Hoạt hình: MyMove 5S1;
|
| Vị trí: Tuyệt đối; mymove {
|
| ?> {left: 0px;}
|
| #tập đoàn { {left: 300px;}
|
| } |
| style>
|
| head>
|
| <body>
|
|
|
| echo "Vui lòng chọn Hoạt động";p><strong>Note:strong> The animation-timing-funtion property is not supported in Internet Explorer 9 and earlier versions.p>
|
|
|
|
|
|
|
| <div id="get">
|
| <form method="post" action="BasicCalculator.php">
|
| <div id="group">
|
| ?>div id="div1">Enter 1st number: <input type="text" name="number1" value=" if(isset($num1)) {echo $num1;} ?> " > div>br>
br>
|
| #tập đoàn {div id="div2">Enter 2nd number: <input type="text" name="number2" value=" if(isset($num2)) {echo $num2;} ?> " >div>
br> br>
|
| chế độ hoạt hình-fill: chuyển tiếp; /*hoạt hình sẽ dừng ở khung cuối cùng và sẽ không đặt lại để bắt đầu !!!*//br>br>
|
| -Webkit-Animation: MyMove 5S1; / * Safari 4.0 - 8.0 */div id="div3"><input type="radio" name="g" value="+"> Additiondiv> <br/>
|
| Hoạt hình: MyMove 5S1;div id="div4"><input type="radio" name="g" value="-"> Subtractiondiv>br>
|
| Vị trí: Tuyệt đối;div id="div1"><input type="radio" name="g" value="*">Multiplicationdiv> <br/>
|
| Trái: 5px;div id="div2"><input type="radio" name="g" value="/">Divisiondiv> br>
|
| }div id="div3"><input type="radio" name="g" value="%">Modulodiv> <br/><br/>
|
| /*#lấy {div id="div4"><input type="submit" name="submit">div><br/><br/>
|
| Vị trí: Tuyệt đối;div id="div5"><h2 style="color:blue"> Output: echo $result; ?> h2>div>
|
| div>
|
| form>
|
|
|
| div>
|
|
|
|
|
| <script>
|
| Trái: 5px;
|
|
|
| for(leti=5;i(let i =5; i < window.width(); i++)
|
| }*/
|
| document.getElementById('YOURELEMENT').left=i+'px';.getElementById('YOURELEMENT').left = i + 'px';
|
| Div {
|
|
|
| script
|
|
|
|
|
|
|
| body>
|
| html>
|
|
|