Board logo

標題: 詩瑜作品 [打印本頁]

作者: may    時間: 2022-7-23 15:53     標題: 詩瑜作品

作品網址
作者: 郭詩瑜    時間: 2022-7-23 16:10

位元轉換
  1. <!DOCTYPE html>
  2. <html>

  3. <style>
  4. body{
  5. margin:0px;
  6. padding:0px;
  7. background: url(https://i.imgur.com/l8GQTaL.png) center center fixed ; 
  8. }        
  9. </style>

  10. <center>
  11. <tittle> <font color='white'> <H1> BASE CONERTER </H1> </font></tittle> </head>
  12. </center>
  13. <hr>
  14. <marquee direction="left" height="30" scrollamount="15" behavior="alternate" bgcolor="#C0C0C0"> Power By: K / Contact Email: KUJONASTUDIO@gmail.com </marquee>
  15. <body>

  16. <!--
  17. Your num
  18. -->
  19. <?php if(empty($_POST)):?>
  20.     <font color='#FFFFE0'>YOURE NUMBER </font><form action="<?php echo $_SERVER['PHP_SELF'];?>" method="POST">
  21.         <input type="text" name="number"required >
  22.         <br>
  23.         <?php else:
  24.             echo "<font color='FFFFE0'>"."You Choose A Integer "."<font color='#49D9E9'>".$_POST["number"]."</font>".""."</font>"."<br>";

  25.     #Defind $num 定義$num #
  26.            $num = $_POST["number"];

  27.             endif?>

  28. <!--
  29. Your base
  30. -->
  31. <?php if(empty($_POST)):?>
  32.     <font color='#FFFFE0'>YOURE BASE (2-32)</font><form action="<?php echo $_SERVER['PHP_SELF'];?>" method="POST">
  33.         <br>
  34.         <input type="number" step="1" min="2" max="32" name="base" required>
  35.         <br>


  36.         <?php else:
  37.             echo "<font color='FFFFE0'>"."From Base "."<font color='#49D9E9'>".$_POST["base"]."</font>".""."</font>"."<br>";

  38.     #Defind $b 定義$b #
  39.            $b = $_POST["base"];

  40.             endif?>

  41. <!--
  42. to what  
  43. -->
  44. <?php if(empty($_POST)):?>
  45.     <font color='#FFFFE0'> TO WHAT BASE (2-32)</font><form action="<?php echo $_SERVER['PHP_SELF'];?>" method="POST">
  46.         <br>
  47.         <input type="number" step="1" min="2" max="32" name="what" required>
  48.         <?php else:
  49.             echo "<font color='FFFFE0'>"."To Base "."<font color='#49D9E9'>".$_POST["what"]."</font>"."<br>"."<font color='3DFFFF'>"."<H3>"."CONVERT COMPLETED."."<H3>"."</font>"."</font>";

  50.             #Defind $wb 定義$wb #
  51.            $wb = $_POST["what"];
  52.             endif?>
  53. <!--
  54. Submit 送出輸入值
  55. -->
  56. <form> <button type ="subit" name="Submit">ENTER</button> </form>
  57. <br>
  58. <!--
  59. Reset 重置
  60. -->
  61. <input type ="button" onclick="location.href='nconvert.php'" value="RESET"></input>

  62. <?php
  63. # your base To
  64. function BC($space = '', $base = '', $tob = '')
  65. {
  66.   $a = base_convert($space, $base, $tob);
  67.     echo "<font color='#FFFFE0'>";
  68.     echo "Youre base is: ";
  69.     echo "</font>";
  70.     echo "<font color='#FFC4C4'>";
  71.     echo $base;
  72.     echo "</font>";
  73.     echo '<br>';

  74.     echo "<font color='#FFFFE0'>";
  75.     echo "Youre Target base is: ";
  76.     echo "</font>";
  77.     echo "<font color='#FFC4C4'>";
  78.     echo $tob;
  79.     echo "</font>";
  80.     echo "<br>";

  81.     echo "<font color='#FFFFE0'>";
  82.     echo "The answer is: ";
  83.     echo "</font>";
  84.     echo "<font color='#FFC4C4'>";
  85.     echo "$a";
  86.     echo "</font>";
  87. };
  88. ?>

  89. <!--
  90. Output 輸出
  91. -->

  92. <?php if ($num > 1):
  93.     {
  94. echo "<br>";
  95. echo "<font color='white'>"."<H3>"."BASE CONERTER"."<H3>"."</font>"."<h4>"."<h4>";
  96. echo "<font color='#FFFFE0'>";
  97. echo "You enter: "."</font>"."<font color='#3DFFCE'>".$num."</font>";
  98. echo "<br>";
  99. echo BC($space = $num, $base = $b, $tob = $wb)."<h5>";
  100. echo "</font>";
  101.     };
  102. endif?>

  103. <!--
  104. End Page 結束
  105. -->
  106. <form>
  107. <button type ="button" name="longbtn" onclick="javascript:location.href='https://www.google.com'" >Back to<br>Google</button>
  108. </form>

  109. <font color='white'>
  110. <hr> COPPYRIGHT© KUONA'STUDIO 2021</hr>

  111. </font>
  112. </body>
  113. </html>
複製代碼

作者: 郭詩瑜    時間: 2022-7-23 16:16

密碼生成器[attach]13364[/attach]
作者: 郭詩瑜    時間: 2022-7-23 16:17

練習
  1. <!DOCTYPE html>
  2. <html>
  3. <body background="https://thumbs.dreamstime.com/b/%E7%B1%B3%E8%89%B2%E4%BA%9A%E9%BA%BB%E5%85%A8%E6%A1%86%E6%A1%8C%E5%B8%83-%E5%B8%83%E7%BA%B9%E8%83%8C%E6%99%AF-%E5%A4%8D%E5%88%B6%E7%A9%BA%E9%97%B4-%E9%AB%98%E8%B4%A8%E9%87%8F%E7%85%A7%E7%89%87-198771724.jpg">
  4. <head>

  5. <center>
  6. <tittle> <H1> Multiplication table </H1> </tittle> </head>
  7. </center>
  8. <hr>

  9. <marquee direction="left" height="30" scrollamount="5" behavior="alternate" bgcolor="#977C00"> Power By:Jason Kuo / Contact Email: jason.kuo@iis.kh.edu.tw </marquee>

  10. <body>
  11. <center>
  12. <a href= "https://youtu.be/mvOkMYCygps" >
  13. <img src="https://download.logo.wine/logo/Khan_Academy/Khan_Academy-Logo.wine.png" width="600" heigh="400">
  14. </a>
  15. </center>

  16. </br>

  17. <center>
  18. <h2>
  19. Click the picture to go Khan Academy
  20. </h2>
  21. </center>

  22. <center>

  23. <table>

  24. <?php
  25.        echo "<h4>";
  26.       
  27. for ($x=1;$x<10;$x++) {

  28.     echo "</p>";
  29.     echo "<center>";
  30.     echo "($x)";
  31.     echo "</center>";
  32.     echo "</br>";
  33.    
  34.               echo "<td>";
  35.          for ($y=1;$y<10;$y++) {
  36.             echo "</td>";
  37.             
  38.             echo "["."{$x}*{$y}=". ($x*$y)."]". "   " ;
  39.               
  40.         
  41.      }
  42.                  echo "</br>";
  43.                
  44. }
  45.   
  46.   echo "</h4>";
  47. ?>

  48. ------------------------------------------------------------------------------------

  49. <H1> 25 Number small to BIG </H1>
  50. <hr>
  51. <?php

  52. echo "<form method=post action= text.php >";
  53. echo "<input type=text name=msg>";
  54. echo "<input type=submit value=送出>";
  55. echo "</form>";
  56. echo "</br>";
  57. echo "</p>";

  58. if(empty($_POST['msg'])){
  59.         echo " <br/> Please fill in the fields";
  60.     }else{
  61.         $name= $_POST['msg'];
  62.         echo ('Your Name is:     '. $name. '<br/>');
  63.         echo ('Your Email is:'   . $email. '<br/>');
  64.     };
  65.    
  66. $x =mt_rand(-100,100);
  67. $y =mt_rand(abs($x)+100);

  68. if ($y<$x) {
  69. $y =abs($y+100);
  70. }

  71. $a =  array();
  72. while(count($a)<25){
  73. $a=array_unique($a);
  74. $a[]=mt_rand($x,$y);
  75. };

  76. $len = count($a);

  77.     for ($i=0;$i<$len;$i++) {
  78.    
  79.       for ($j=$i+1;$j<$len;$j++) {
  80.       
  81.           if ($a[$i] > $a[$j]) {
  82.             $tmp=$a[$i];
  83.             $a[$i] =$a[$j];
  84.             $a[$j] = $tmp;  
  85.           }
  86.       }
  87.       
  88.     }  


  89. foreach($a as $key => $value){

  90. echo $value;
  91. echo " | " ;
  92. }
  93. echo "</br>";

  94. ?>

  95. <H1>Any else </H1>
  96. <hr>
  97. </table>
  98. </center>
  99. </p>
  100. <center>
  101. <form action=" " method="post">

  102.     <p>Name:</p>
  103.     <p><input type="text" name="name" value="Your Name"></p>

  104.     <p>Email:</p>
  105.     <p><input name="species" type= "Text"></p>

  106.     <p>Comments: </p>
  107.     <p><textarea name="comments" rows="5" cols="20">Your Comments</textarea></p>

  108.     <p>What would you like to learn:</p>
  109.     <p><input type="radio" name="interest" value="html"> HTML</p>
  110.     <p><input type="radio" name="interest" value="css"> CSS</p>
  111.     <p><input type="radio" name="interest" value="js"> JavaScript</p>

  112.     <p><input type="submit" value="SEND"></p>

  113. </form>
  114. </center>

  115. </body>
  116. </html>
複製代碼

作者: 郭詩瑜    時間: 2022-7-23 17:57

  1. shorturl.at/AEJN0
複製代碼





歡迎光臨 種子論壇 | 高雄市資訊培育協會學員討論區 (http://istak.org.tw/seed/) Powered by Discuz! 7.2