返回列表 发帖
  1. <html>
  2. <body>
  3. <script>
  4. function calc() {
  5.   var int = txtint.value;
  6.   var vit = txtvit.value;
  7.   var slv = txtslv.value;
  8.   if ((int+vit)!=0) {
  9.     txtres.value= Math.floor(0.7*vit*int*int/(int+vit))*slv;
  10.   }
  11. }
  12. </script>
  13.   我方Int=<input type=text name=txtint>
  14.   <br>
  15.   我方SLv=<input type=text name=txtslv value=10>
  16.   <br>
  17.   对方Vit=<input type=text name=txtvit>
  18.   <br>
  19.   <input type=button value='计算' onclick='calc();'>
  20.   <br>
  21.   结果=<input type=text name=txtres>
  22. </body>
  23. </html>
复制代码


记事本,把上面的拷贝进去,另存为calc.htm
运行calc.htm就可以,允许js

这样?

TOP

原帖由 らёгαρん 于 2006-3-18 11:36 发表
要考虑披肩卡减伤害
被动技能减伤害
GVG减伤害
对人减伤害

单纯算个数字没什么难度的...

老实说,就算都加上又有什么难度的,只要有数据就行,代码也就是几行的事情

TOP

返回列表