话不多说 先上效果图:
功能:
1.每一个更新按钮对应着所更新的书籍定价数量,并将结果输出至消费总金额处
2.提交对应着所有书籍对应价格数量的总和,同样输出至总金额处
3.重置既刷新页面
实列:
1.整体是居中的,效果图存在位置偏差
2.数量和消费总金额的默认值是0,如果将0删除会出现报错,所以请小心
OK 上代码
.aspx
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebForm1.aspx.cs" Inherits="login.WebForm1" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8" />
<title>202023860346李凤山</title>
</head>
<body>
<style>
table{
text-align:center;background:#00ffff;border-collapse: collapse;width:580px;}
table td {
border-top: 0;
border-right: 2px solid #00ffff;
border-bottom: 2px solid #00ffff;
border-left: 0;
}
table tr.lastrow td {
border-bottom: 0;
}
table tr td.lastCol {
border-right: 0;
}
</style>
<form id="form1" runat="server">
<table style="margin:auto;">
<tr><td colspan="4" headers="" style="background:#fff" class="lastCol">购买图书</td></tr>
<tr>
<td colspan="2" headers="">请选择:
<select id="sel" name="sel" onchange="selectcity()">
<option value="Oracle实用教程(第4版) 49.00     ">Oracle实用教程(第4版)</option>
<option value="Java实用教程(第3版) 49.00     ">Java实用教程(第3版)