1、asp网站运行:设计一个简单的计算器,输入两个数后可以求两个数的和、差等。界面如下:完整代码
保存为test.asp
---------------------------
<%
a=cint(request("a"))
b=cint(request("b"))
c=request("c")
if c=1 then
d="+"
else
d="-"
end if
if a="" or b="" or c="" then
label1="没有输入内容内"
else
label1=a&d&b
end if
%>
<form name="form1" action="test.asp" method="post">
<input type="text" name="a" />
<input type="radio" name="c" value="1" checked="checked" />+ <input type="radio" name="c" value="0" />-
<input type="text" name="b" />
<input type="submit" name="操作容" />
</form>
<%
if c=1 then
e=a+b
else
e=a-b
end if
response.Write(label1&"="&e)
%>
2、在自己电脑上设计的网页计算器,如何操作可以让别人通过手机打开?急,求大神指教。
将网页上传到网站,然后将这个网页的地址发给对方,对方就可以用手机打开了
3、简单的网页计算器制作,是不是我代码写错了,怎么显示的是不完整的呢?
添加点样式,或者表格来调整位置。
4、网页计算器设计
我写了个简单的```你要的那些都有````附件
5、网页制作,,,公式计算器
我做了个简单的 你先拿去用吧。
把代码粘贴到html文件里面就好了。
纯手打的 望采纳。
——————————————————代码—————————————————
<html>
<head>
<title>Caculator</title>
</head>
<body>
<table>
<tr>
<td>单价:</td><td><input type="text" id="sPrice" value="" /></td>
</tr>
<tr>
<td>数量:</td><td><input type="text" id="Num" value=""/></td>
</tr>
<tr>
<td>总价:</td><td><input type="text" id="TPrice" value=""/></td>
</tr>
<tr>
<td><input type="button" id="cacul" value="计算" onclick="cal();"/></td>
</tr>
</table>
</body>
<script type="text/javascript">
function cal(){
var sPrice = document.getElementById('sPrice').value;
var Num = document.getElementById('Num').value;
var TPrice= document.getElementById('TPrice').value;
if(sPrice!=''&&Num!=''){
TPrice = sPrice*Num;
document.getElementById('TPrice').value = TPrice;
}
if(Num==0&&TPrice!=''){
alert('除数不能为零!');
}
if(TPrice!=''&&Num!=''&&Num!=0){
sPrice = TPrice/Num;
document.getElementById('sPrice').value = sPrice;
}
}
</script>
</html>
6、网页设计与制作设计一个页面,实现一个四则计算器
这个代码其实网上有很多现成的,而且做有CSS布局各种形式的都有,自己多花点时间搜索下就可以找到 。
7、用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>
8、用Visual Studio 2008设计一个ASP.NET网页程序:简单计算器的设计。
做一个加法运算为例,点击Button触发事件
在窗体下实行代码如下:
if (textBox1.Text == "" || textBox2.Text == "")
{
MessageBox.Show("没有操作数");
}
int a, b, c;
a = int.Parse(textBox1.Text);
b = int.Parse(textBox2.Text);
c = a + b;
textBox3.Text = c.ToString();
}
9、如何用运用html和css相关技术,设计一个网页在线计算器的界面
html+css只是静态样式。而涉及到计算方面,得再加js就能实现了。