显示textbox的时候用什么方法,不刷新页面????急!!
解决方案 »
- 请大家帮我分析一下网页中的部分数据是从哪个JS中获得的,如何借用!
- 很简单 挺奇怪
- 如何在gridview中 显示浮动层
- Js怪问题
- 在treeview中如何点击一节点,得到该节点的值???
- 关于DataGrid绑定数据源后再绑定里面的控件的高难问题!!!
- 大家都用DataGrid么?能不能不用那控件自己写啊!
- 请教关于web设计器的问题
- OFFICE2003或者OFFICE XP接收HTML格式的郵件時無法實現自動轉向,請各位高手賜教!
- 我数组里存了10个LONG型的数,我要把他们从小到大排序,并取出其中第2个数?
- asp.net 用ajax 的timer 组件查后台的sql server数据库,在最小化时查到数据后能闪状态栏上闪动怎么实现呢,把窗口最大化显示也行
- Frame中的top窗口中点击“重新登录”,只能在top窗口中显示“重新登录”页面吗?
就是走服务器
document.getElementByID("textbox").value = document.getElementByID("drop1").value + document.getElementByID("drop2").value * document.getElementByID("drop3").value / document.getElementByID("drop4").value;
<script language="javascript">
function gettotal()
{
var a=Number(document.getElementById('下拉框1').value);
var b=Number(document.getElementById('下拉框2').value);
var c=Number(document.getElementById('下拉框3').value);
var d=Number(document.getElementById('下拉框4').value);
var total=a+b+c+d;
document.getElementById('txtTotalFee').value=total;
}
</script> <asp:TextBox ID="txtTotalFee" runat="server" CssClass="InputCss"
onfocus="gettotal()" ReadOnly="true" Width="140px"></asp:TextBox>
<head runat="server">
<title>Untitled Page</title> <script language="javascript">
function gettotal()
{
var a=Number(document.getElementById('drop1').value);
var b=Number(document.getElementById('drop2').value);
var c=Number(document.getElementById('drop3').value);
var d=Number(document.getElementById('drop4').value);
var total=a+b+c+d;
document.getElementById('txtTotalFee').value=total;
}
</script></head>
<body>
<form id="form1" runat="server">
<div>
<asp:DropDownList ID="drop1" runat="server">
<asp:ListItem>7</asp:ListItem>
</asp:DropDownList>
<asp:DropDownList ID="drop2" runat="server">
<asp:ListItem>5</asp:ListItem>
</asp:DropDownList>
<asp:DropDownList ID="drop3" runat="server">
<asp:ListItem>2</asp:ListItem>
</asp:DropDownList>
<asp:DropDownList ID="drop4" runat="server">
<asp:ListItem>9</asp:ListItem>
</asp:DropDownList>
<asp:TextBox ID="txtTotalFee" runat="server" CssClass="InputCss" onfocus="gettotal()"
ReadOnly="true" Width="140px"></asp:TextBox>
</div>
</form>
</body>
</html>
晕就是aspx页面,把上面部分复制,代替你新建的页面的这部分!
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>Untitled Page</title>
</head>
<body>
<form id="form1" runat="server">
<div>
</div>
</form>
</body>
</html>