3.html

来自「用户可随意选择两个数」· HTML 代码 · 共 41 行

HTML
41
字号
<!doctype html public "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
  <head>
    <title> m~n累加和 </title>
    <script language="vbScript">
      <!--
        function abc()
          m=document.form1.text1.value
          n=document.form1.text2.value
          sum=0 
		  if m<n then
            for i= m to n
              sum=sum+i	
			  next
              document.form1.text3.value = sum
			else
			  for i= m to n step -1
			  sum=sum+i
            next
            document.form1.text3.value = sum
	      end if
        end function
      -->
    </script>
  </head>

  <body background="b11.jpg">
    <font size="12" color="#FFFF99"><b><center>m~n累加和</center></b></font>
    <form name="form1">
      <center>
        m值<input type="text" name="text1">
        n值<input type="text" name="text2">
		<input type="text" name="text3">
        <input type="button" name="button1" value="确定" onclick="abc()"><br><br>

      </center>

    </form>

</body>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?