当前位置: 首页> 网络科技> 数码> 正文

计算器网页版(梦幻经验计算器网页版)

  • 只为她袖手天下只为她袖手天下
  • 数码
  • 2023-06-21 04:06:01
  • -
梦幻西游计算器下载 梦幻西游计算器 官方版网页版 起点软件园

用JavaScript做个网页版的计算器?

alert(eval("1+163+2-4+5"));这个直接能把结果给计算出来。

基本上最难得哪个部分已经给你答复了,至于怎么传值,这个是最基础的,希望你自己也动动手,什么都写下来,成长的过程就被扼杀掉了

用css js做一个网页版的计算器,要有加减乘除运算,和归零删除键

!DOCTYPE html

html lang="en"

head

meta charset="UTF-8"

title计数器/title

/head

body

input type="text" name="text" id="pre" onblur="validate(this.value);"

select id="operator"

option value="+"+/option

option value="-"-/option

option value="*"*/option

option value="/"//option

/select

input type="text" name="text" id="next" onblur="validate(this.value);"

span=/span

input type="text" id="result" readonly="true"

input type="button" id="btn" value="提交" onclick="calculator();"

script

function validate(str){

var reg = /^\d+$/;

if (!reg.test(str)) {

alert("请输入数字");

}

}

function calculator(){

var pre=document.getElementById("pre").value;

var next=document.getElementById("next").value;

var opra=document.getElementById("operator").value;

var result=0;

switch(opra) {

case "+":

result=parseInt(pre)+parseInt(next);

break;

case "-":

result=parseInt(pre)-parseInt(next);

break;

case "*":

result=parseInt(pre)*parseInt(next);

break;

case "/":

if(parseInt(next)!=0){

result=parseInt(pre)/parseInt(next);

}

else{

alert("除数不能为0");

return;

}

break;

default:

break;

}

document.getElementById("result").value=result;

}

/script

/body

/html

[img]梦幻西游计算器网页版什么样子的

我的世界神秘4要素蒸馏研究笔记怎么连

这个是神秘计算器网页版地址:

使用方法:1.选择版本

2.选择最短的步数

3.选择从哪个元素连到哪个元素即可

网页版计算器

!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" ""

html xmlns=""

head

meta http-equiv="Content-Type" content="text/html; charset=utf-8" /

titleWEB计算器/title

!---计算器功能模块--

script language="javascript" type="text/javascript" runat="server"

var lingState="beStart"; //当前状态

var curOper="start"; //当前运算符

var num1=0; //初值

var num2=0; //初值

var subOper=false; // 是否刚刚单击过运算符

var upOper=false;//运算符的标签

var tnumber=false;//MR记住显示框的状态

var cM=false;//记住M启动

var xM=false;//记住按M+

var ms=false;//记住是否按MS

var sk=false;

var twonumber=false;

var ss;//保存MS要保存的值

var sb=0;

//数字键触发功能模块

function number(i)

{

if(subOper ) //表示在此之前刚刚单击过运算符或者刚刚单击过等号

{

form.ipt.value=i; //把输入的值赋给文本框显示

subOper=false;//输入数后,点击了符号

lingState="beInteger";

}

else

{ //表示正在进行或开始一个数字的输入

if(form.ipt.value=="0")//当文本显示框为0时,则把刚刚单击的数值赋给文本框

{

form.ipt.value=i;//当符合条件则把单击的数值(this.value)赋予给显示框1

lingState="beInteger";

}

else

form.ipt.value += i;//当文本显示框不为0,则数值累加显示文本框

}

if(curOper!="start")//判断是否单击过运算符

{

num2=form.ipt.value;

}

// alert("初值num1的值"+num1);

// alert("num2的值"+num2);

//lingState="beStart"; //清除当前状态

upOper=true;//记住输入数字 以便下面+号连+运算

tnumber=true;//记住有值

}

/* + - * / */

//结果运算模块

function sum()

{

if (curOper!="start")//判断是否单击按钮(符号为空

{

switch(curOper)

{

case "+": //判断符号为+时执行+运算

num1= parseFloat(num1)+parseFloat(num2); //把第一次输入的值和第二次的值进行运算

break;

case "-": //判断符号为-时执行+运算

num1= parseFloat(num1)-parseFloat(num2);

break;

case "*": //判断符号为*时执行+运算

num1= parseFloat(num1)*parseFloat(num2);

break;

case "/": //判断符号为/时执行+运算

if(num2=="0")

{

alert("除数不能为零");

}

else{

num1= parseFloat(num1)/parseFloat(num2);

}

break;

}

form.ipt.value=num1;//把运算结果赋给显示框

}

subOper=true;//输入数后,点击了符号

//curOper="start"; //清除当前符号状态

lingState="beStart";//清除当前状态

upOper=false;//=运算一次后记住 避免再按+号又进行运算 ( 清除当前符号状态

sk=true;

}

//常规符号运算功能模块

function allfhao(i)

{

subOper=true;//输入数后 输入符号 进行运算

if (curOper=="start")//实现连运算 原理:当运行当前运算符时实现连运算

{

num1=form.ipt.value; //把第一个数赋值给num1

curOper=i; //单击运算符用变量把运算符记住

tnumber=true;

}

else

{

if(upOper)//当upOper为真时则实现连运算

{

sum();//当符合条件时调用结果运算 实现连运算

}

curOper=i;//单击运算符用变量把运算符记住

}

upOper=false;//=运算一次后记住 避免再按+号又进行运算 ( 清除当前符号状态

lingState="beStart";//清除当前状态

// alert("符号num1的值"+num1);

// alert("num2的值"+num2);

}

//小数点功能模块

function point()

{

if(form.ipt.value.indexOf(".")==-1) //判断是否有小数点,如果有就不显示 如果没有那么进行下面的运算

{

if(lingState=="beStart")//如果进行了等号运算 但并没有小数点 但单击了小数点则显示0.几

{

form.ipt.value="0.";//当符合条件则显示框1 显示0.

subOper=false;//输入数后,点击了符号

lingState="beFloat"; //让一个变量记住以输入小数点

}

if(lingState=="beInteger" )//判断是否有数输入,如果有数数输入但不是接这等号运算则显示小数点

{

form.ipt.value+=".";//当符合条件则显示小数点

lingState="beFloat";//用一个变量记住已经输入一个小数点,当下次输入由于值的改变则不能输入,起到只能输入一个小数点的功能

}

}

}

//全部清除功能模块 C CE Backspace

function cleaktext(i)

{

switch(i)

{

case"C"://清除C

form.ipt.value="0"; //清除文本框内的内容

lingState="beStart"; //清除当前状态

curOper="start"; //清除当前符号状态

subOper=false; // 是否刚刚单击过运算符

upOper=false;//运算符的标签

num1=0;

num2=0;

break;

case"CE": //清除CE

form.ipt.value="0"; //清除文本框内的内容

break;

case"Backspace": //推格删除

if(cM=false)//如果启动MR那么不能实现推格功能

{

if(upOper)

{

if (form.ipt.value.length1)

{

form.ipt.value=form.ipt.value.substring(0,form.ipt.value.length-1); //运用substring取字符串方法将返回一个包含从原始对象中获得的子字符串的 String 对象。 使用 start 和 end 两者的较小值作为子字符串的起始点。

}

else

{

form.ipt.value="0";//一个一个删除

}

}

break;

}

}

}

/* % 1/x sqrt +/- pi */

//全部的特殊符号运算模块

function alltx(i)

{

switch(i)

{

case "%"://%运算

form.ipt.value=form.ipt.value/100;

num2=form.ipt.value;

break;

case "1/x":

if(form.ipt.value=="0"){

form.ipt.value="除数不能为零。";

}

else {

form.ipt.value=1/form.ipt.value;

num2=form.ipt.value;

}

break;

case "sqrt"://开方

form.ipt.value=Math.sqrt(form.ipt.value); //math对象 开方运算

num2=form.ipt.value;

break;

case "+/-"://+/-运算符 负号运算

if(upOper)//当运行了符号则不能按负号

{

form.ipt.value=0-form.ipt.value;

num2=form.ipt.value;

}

else{

form.ipt.value="0";

}

break;

case "pi":

form.ipt.value="3.1415926";

num2=form.ipt.value;

break;

case "sin":

form.ipt.value=Math.sin(form.ipt.value);

num2=form.ipt.value;

break;

case "cos":

form.ipt.value=Math.sin(form.ipt.value);

num2=form.ipt.value;

break;

case "tan":

form.ipt.value=Math.sin(form.ipt.value);

num2=form.ipt.value;

break;

}

}

//全部M系列功能模块

function checkallM(i){

switch(i)

{

case"M+"://启动M系列功能模块

if(form.ipt.value!="0" ms==false)

{

form.ipt1.value="M";//在显示框2显示M以告知用户以启动M系列功能

sm=form.ipt.value;

}

if(form.ipt1.value=="M" ms!=false)

{

sm=eval(ss+'+'+form.ipt.value);//MR保存的值提取实现M+功能

}

xM=true; //记住单击过M+ 以便MR操作

break;

case "MS"://启用M系列功能 启动记忆功能(记忆上一次计算结果)

ss=form.ipt.value;// 把显示框结果给SS保存(予以MR提取

if(form.ipt.value=="0")//当显示框1显示结果为0时单击MS时也可以清除显示框2 M功能

{

form.ipt1.value="";//清除显示框2 M

}

if(form.ipt.value!="0")

{

form.ipt1.value="M";

}

ms=true; //记住单击过Ms 以便MR操作 (看是否赋+运算后的值 还是当前值

break;

case "MR"://提取MS保存数值功能

if(xM)//是否单击m+

{

if(form.ipt1.value=="M" )//当启动M功能时 MR才能起到保存提取的功能

{

form.ipt.value=sm;//当条件符合 则把MS保存的值 并实现M+功能

}

else if(subOper || tnumber){//没有启动M功能 则清除显示框

form.ipt.value="0";

}

}

// else{ form.ipt.value=ss;}

break;

case "MC": // 清除M显示框中M系列的功能

form.ipt1.value="";//清空显示框2的 M功能

xM=false;

ms=false;

break;

}

cM=true;

lingState="beStart";//清除当前状态

}

//onLoad="setStart()"

/script

style type="text/css"

#c{

width:320px;

height:270px;

border:#666666 5px groove;

background-color:#ECE9D8

}

#ipts{ margin:5px 5px 3px 5px; text-align:right; width:270px}

#s{ margin:7px 5px 6px 5px; height:200px}

.bt{ width:30px; height:30px; background-color:#ECE9D8; border:solid 1px #C8C6B0}

.bt2{width:75px; height:30px; color:#F00; background-color:#ECE9D8; border:solid 1px #C8C6B0;}

.bt3{width:20px; height:20px; text-align:center;}

.wz{ font-size:12px}

/style

/head

body

!---隐藏层--

div id="s"

FORM METHOD=POST ACTION="" name="form"

div id="c"

table width="98%" height="268" border="0" align="center" cellpadding="0"

tr

td height="19" colspan="7"

table width="294" border="0" cellpadding="0" cellspacing="0"

tr

td class="wz" width="12" height="19" /td

td class="wz" width="47"编辑(E)/td

td class="wz" width="49"查看(V)/td

td class="wz" width="186"帮助(H)/td

/tr

/table/td/tr

tr

td height="29" colspan="7"

div id="ipts"

input name="ipt" type="text" id="ipts" value="0" size="40" maxlength="20" readonly="readonly" /

/div

/td/tr

!-- ipt1 Backspace CE C --

tr

td height="38" colspan="7" align="center"table width="100%" border="0" cellspacing="0" cellpadding="0"

tr

td width="14%" align="center"input name="ipt1" type="text" disabled="disabled" class="bt3" size="1" maxlength="0" //td

td width="86%" align="center"table width="97%" border="0" cellspacing="0" cellpadding="0"

tr

td align="center"input name="button23" type="button" class="bt2" id="button23" style="color:#00F" value="Backspace" onclick="cleaktext(this.value)"//td

td align="center"input style="color:#00F" name="button21" type="button" class="bt2" id="button20" value="CE" onclick="cleaktext(this.value)"//td

td align="center"input style="color:#00F" name="button20" type="button" class="bt2" id="button21" value="C" onclick="cleaktext(this.value)"//td

/tr

/table/td

/tr

/table/td

/tr

!-- MC 7 8 9 / sqrt --

tr

td width="16%" align="center"table width="99%" height="162" border="0"

tr

td height="35" align="center"input style="color:#F00" type="button" value="MC" class="bt" onclick="checkallM(this.value)"//td

td width="16%" align="center"input style="color:#00F" name="button1" type="button" class="bt" id="button1" value="7" onclick="number(this.value)" //td

td width="14%" align="center"input style="color:#00F" name="button2" type="button" class="bt" id="button2" value="8" onclick="number(this.value)" //td

td width="14%" align="center"input style="color:#00F" name="button3" type="button" class="bt" id="button3" value="9" onclick="number(this.value)"//td

td width="13%" align="center"input style="color:#F00" name="button4" type="button" class="bt" id="button4" value="/" onclick="allfhao(this.value)"//td

td width="14%" align="center"input style="color:#00F" name="button5" type="button" class="bt" id="button5" value="sqrt" onclick="alltx(this.value)"//td

td width="16%" align="center"input style="color:#00F" name="button24" type="button" class="bt" id="button24" value="sin" onclick="alltx(this.value)"//td

/tr

!-- MR 4 5 6 * % --

tr

td width="13%" height="39" align="center"input style="color:#F00" type="button" value="MR" class="bt" onclick="checkallM(this.value)"//td

td width="16%" align="center"input style="color:#00F" name="button6" type="button" class="bt" id="button6" value="4" onclick="number(this.value)" //td

td width="14%" align="center"input style="color:#00F" name="button7" type="button" class="bt" id="button7" value="5" onclick="number(this.value)"//td

td width="14%" align="center"input style="color:#00F" name="button8" type="button" class="bt" id="button8" value="6" onclick="number(this.value)"//td

td width="13%" align="center"input style="color:#F00" name="button9" type="button" class="bt" id="button9" value="*" onclick="allfhao(this.value)"//td

td width="14%" align="center"input style="color:#00F" name="button10" type="button" class="bt" id="button10" value="%" onclick="alltx(this.value)"//td

td width="16%" align="center"input style="color:#00F" name="button25" type="button" class="bt" id="button25" value="cos" onclick="alltx(this.value)"//td

/tr

!-- MS 1 2 3 - 1/x --

tr

td width="13%" height="38" align="center"input style="color:#F00" type="button" value="MS" class="bt" onclick="checkallM(this.value)" //td

td width="16%" align="center"input style="color:#00F" name="button11" type="button" class="bt" id="button11" value="1" onclick="number(this.value)"//td

td width="14%" align="center"input style="color:#00F" name="button12" type="button" class="bt" id="button12" value="2" onclick="number(this.value)"//td

td width="14%" align="center"input style="color:#00F" name="button13" type="button" class="bt" id="button13" value="3" onclick="number(this.value)"//td

td width="13%" align="center"input style="color:#F00" name="button14" type="button" class="bt" id="button14" value="-" onclick="allfhao(this.value)"//td

td width="14%" align="center"input style="color:#00F" name="button15" type="button" class="bt" id="button15" value="1/x" onclick="alltx(this.value)"//td

td width="16%" align="center"input style="color:#00F" name="button26" type="button" class="bt" id="button26" value="tan" onclick="alltx(this.value)"//td

/tr

!-- M+ 0 +/- . + = --

tr

td width="13%" height="38" align="center"input style="color:#F00" type="button" value="M+" class="bt" onclick="checkallM(this.value)"//td

td width="16%" height="38" align="center"input style="color:#00F" name="button16" type="button" class="bt" id="button16" value="0" onclick="number(this.value)"//td

td width="14%" height="38" align="center"input style="color:#00F" name="button17" type="button" class="bt" id="button17" value="+/-" onclick="alltx(this.value)"//td

td width="14%" align="center"input style="color:#00F" name="button18" type="button" class="bt" id="button18" value="." onclick="point()"//td

td width="13%" align="center"input style="color:#F00" name="button19" type="button" class="bt" id="button19" value="+" onclick="allfhao(this.value)" //td

td width="14%" align="center"input style="color:#F00" name="button22" type="button" class="bt" id="button22" value="=" onclick="sum()"//td

td width="16%" align="center"input style="color:#00F" name="button27" type="button" class="bt" id="button27" value="pi" onclick="alltx(this.value)"//td

/tr

/table

/td/tr/table

/div

/FORM

/div

/body

/html

原神伤害计算器用不了

很抱歉,原神伤害计算器用不了。原神伤害计算器是一款专门为原神游戏玩家设计的工具,它可以帮助玩家计算攻击力、防御力、技能伤害等,但是它只能用于原神游戏,不能用于其他游戏。因此,如果你想要计算其他游戏的伤害,就不能使用原神伤害计算器了。

梦幻西游计算器网页版

打开相关网页,打开梦幻西游〖 实用工具箱网页版 〗界面,即可看到如下图:

直接在框框里输入数字,比如,想查询“经验--等级”这一项,直接输入从几级到几级后,后面的框内便会显示数据,以此类推。

人物相关,升级经验计算、按经验可或到等级数计算、人物常规计算、点师门技能花费计算、人物修练计算、服务技能计算、打造所需熟练度计算、打造所需体力计算、活力恢复速度计算。跑商辅助:辅助跑商的玩家快速完成交票。转区查询(非常精确,调用梦幻西游官方数据)。养孩子各种计划书、非常智能的搜索知识教导答案。奇经八脉介绍,在线答题器(里面涵盖了科举考试、图片题目、周杰伦副本、三届书院、元宵灯谜、课堂修行等)。

梦幻西游计算器下载 梦幻西游计算器 官方网页版 起点软件园