CSS 仿Excel表格功能

 
 
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
  2. <html xmlns="http://www.w3.org/1999/xhtml"> 
  3. <head> 
  4. <title>Spreadsheet form - www.codefans.net</title> 
  5. <style> 
  6. table.formdata { 
  7.  border: 1px solid #5F6F7E; 
  8.  border-collapse: collapse; 
  9. table.formdata th { 
  10.  border: 1px solid #5F6F7E; 
  11.  background-color: #E2E2E2; 
  12.  color: #000000; 
  13.  text-align: left; 
  14.  font-weight: normal; 
  15.  padding: 2px 4px 2px 4px; 
  16.  margin: 0; 
  17. table.formdata td { 
  18.  margin: 0; 
  19.  padding: 0; 
  20.  border: 1px solid #E2E2E2; 
  21. table.formdata input { 
  22.  width: 80px; 
  23.  padding: 2px 4px 2px 4px; 
  24.  margin: 0; 
  25.  border: 2px solid #ffffff; 
  26. .formdata input:focus { 
  27.  border: 2px solid #000000; 
  28. </style> 
  29. <script language="javascript" type="text/javascript"> 
  30. function hilite(obj) { 
  31.  obj.style.border = '2px solid #000000'
  32.  
  33. function delite(obj) { 
  34.  obj.style.border = '2px solid #ffffff'
  35. </script> 
  36. </head> 
  37. <body> 
  38. <form method="post" action="spreadsheet.html"> 
  39. <table class="formdata" summary="This table contains a form to input the yearly income for years 1999 through 2002"> 
  40.   <caption>Complete the Yearly Income 1999 - 2002</caption> 
  41.   <tr> 
  42.     <th></th> 
  43.     <th scope="col">1999</th> 
  44.     <th scope="col">2000</th> 
  45.     <th scope="col">2001</th> 
  46.     <th scope="col">2002</th> 
  47.   </tr> 
  48.   <tr> 
  49.     <th scope="row">Grants</th> 
  50.     <td><input type="text" name="grants1999" id="grants1999" onfocus="hilite(this);" onblur="delite(this);" /></td> 
  51.     <td><input type="text" name="grants2000" id="grants2000" onfocus="hilite(this);" onblur="delite(this);" /></td> 
  52.     <td><input type="text" name="grants2001" id="grants2001" onfocus="hilite(this);" onblur="delite(this);" /></td> 
  53.     <td><input type="text" name="grants2002" id="grants2002" onfocus="hilite(this);" onblur="delite(this);" /></td> 
  54.   </tr> 
  55.   <tr> 
  56.     <th scope="row">Donations</th> 
  57.     <td><input type="text" name="donations1999" id="donations1999" onfocus="hilite(this);" onblur="delite(this);" /></td> 
  58.     <td><input type="text" name="donations2000" id="donations2000" onfocus="hilite(this);" onblur="delite(this);" /></td> 
  59.     <td><input type="text" name="donations2001" id="donations2001" onfocus="hilite(this);" onblur="delite(this);" /></td> 
  60.     <td><input type="text" name="donations2002" id="donations2002" onfocus="hilite(this);" onblur="delite(this);" /></td> 
  61.   </tr> 
  62.   <tr> 
  63.     <th scope="row">Investments</th> 
  64.     <td><input type="text" name="investments1999" id="investments1999" onfocus="hilite(this);" onblur="delite(this);" /></td> 
  65.     <td><input type="text" name="investments2000" id="investments2000" onfocus="hilite(this);" onblur="delite(this);" /></td> 
  66.     <td><input type="text" name="investments2001" id="investments2001" onfocus="hilite(this);" onblur="delite(this);" /></td> 
  67.     <td><input type="text" name="investments2002" id="investments2002" onfocus="hilite(this);" onblur="delite(this);" /></td> 
  68.   </tr> 
  69.   <tr> 
  70.     <th scope="row">Fundraising</th> 
  71.     <td><input type="text" name="fundraising1999" id="fundraising1999" onfocus="hilite(this);" onblur="delite(this);" /></td> 
  72.     <td><input type="text" name="fundraising2000" id="fundraising2000" onfocus="hilite(this);" onblur="delite(this);" /></td> 
  73.     <td><input type="text" name="fundraising2001" id="fundraising2001" onfocus="hilite(this);" onblur="delite(this);" /></td> 
  74.     <td><input type="text" name="fundraising2002" id="fundraising2002" onfocus="hilite(this);" onblur="delite(this);" /></td> 
  75.   </tr> 
  76.   <tr> 
  77.     <th scope="row">Sales</th> 
  78.     <td><input type="text" name="sales1999" id="sales1999" onfocus="hilite(this);" onblur="delite(this);" /></td> 
  79.     <td><input type="text" name="sales2000" id="sales2000" onfocus="hilite(this);" onblur="delite(this);" /></td> 
  80.     <td><input type="text" name="sales2001" id="sales2001" onfocus="hilite(this);" onblur="delite(this);" /></td> 
  81.     <td><input type="text" name="sales2002" id="sales2002" onfocus="hilite(this);" onblur="delite(this);" /></td> 
  82.   </tr> 
  83.   <tr> 
  84.     <th scope="row">Miscellaneous</th> 
  85.     <td><input type="text" name="misc1999" id="misc1999" onfocus="hilite(this);" onblur="delite(this);" /></td> 
  86.     <td><input type="text" name="misc2000" id="misc2000" onfocus="hilite(this);" onblur="delite(this);" /></td> 
  87.     <td><input type="text" name="misc2001" id="misc2001" onfocus="hilite(this);" onblur="delite(this);" /></td> 
  88.     <td><input type="text" name="misc2002" id="misc2002" onfocus="hilite(this);" onblur="delite(this);" /></td> 
  89.   </tr> 
  90.   <tr> 
  91.     <th scope="row">Total</th> 
  92.     <td><input type="text" name="total1999" id="total1999" onfocus="hilite(this);" onblur="delite(this);" /></td> 
  93.     <td><input type="text" name="total2000" id="total2000" onfocus="hilite(this);" onblur="delite(this);" /></td> 
  94.     <td><input type="text" name="total2001" id="total2001" onfocus="hilite(this);" onblur="delite(this);" /></td> 
  95.     <td><input type="text" name="total2002" id="total2002" onfocus="hilite(this);" onblur="delite(this);" /></td> 
  96.   </tr> 
  97. </table> 
  98. <p><input type="submit" name="btnSubmit" id="btnSubmit" value="Add Data" /></p> 
  99. </form> 
  100. </body> 
  101. </html> 

 

  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
Excel表格在线系统是一种基于互联网的应用程序,主要用于在浏览器上打开、编辑和保存Excel表格文件。它提供了一个方便的平台,让用户可以随时随地使用各种设备(包括电脑、手机、平板等)进行Excel表格的创建和编辑。下面是一些可能的实现源码方案。 首先,前端开发方面可以使用HTML、CSS和JavaScript来构建用户界面。HTML负责页面的结构,CSS负责样式的设计,JavaScript负责与后端通信和处理用户操作。 其次,后端开发方面可以选择使用一种后端编程语言来处理前端传递的数据,比如Java、Python、PHP等。通过后端编程语言,可以实现用户登录、保存Excel文件、读取Excel文件等功能。 此外,还可以使用一些开源的JavaScript插件或框架来辅助开发。比如,可以使用jQuery插件来简化DOM操作,使用Bootstrap框架来实现页面的响应式布局。 在具体的实现过程中,需要注意安全性和性能优化。对于安全性,可以采用一些常见的措施,比如用户身份验证(登录),输入数据的验证和过滤,以及对用户权限的控制等。对于性能优化,可以使用一些技术手段,如前端资源的压缩和合并,后端数据的缓存,以及使用异步请求等。 总之,实现Excel表格在线系统源码需要前端开发、后端开发和相关框架、插件的运用,以及对安全性和性能优化的考虑。通过合理的架构设计和代码编写,可以实现一个功能完善、安全可靠、性能较高的Excel表格在线系统。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值