CSS 仿Excel表格功能

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

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
Excel表格在线系统是一种基于互联网的应用程序,主要用于在浏览器上打开、编辑和保存Excel表格文件。它提供了一个方便的平台,让用户可以随时随地使用各种设备(包括电脑、手机、平板等)进行Excel表格的创建和编辑。下面是一些可能的实现源码方案。 首先,前端开发方面可以使用HTML、CSSJavaScript来构建用户界面。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、付费专栏及课程。

余额充值