{"id":98,"date":"2007-09-07T12:00:00","date_gmt":"2007-09-07T12:00:00","guid":{"rendered":""},"modified":"2011-04-25T08:40:35","modified_gmt":"2011-04-25T08:40:35","slug":"%e5%9c%a8%e5%88%86%e5%b1%82%e6%9e%b6%e6%9e%84%e4%b8%8b%e5%af%bb%e6%89%bejava-web%e6%bc%8f%e6%b4%9e","status":"publish","type":"post","link":"https:\/\/www.inbreak.net\/archives\/98.html","title":{"rendered":"\u5728\u5206\u5c42\u67b6\u6784\u4e0b\u5bfb\u627ejava web\u6f0f\u6d1e"},"content":{"rendered":"

\/\u6587 \u7a7a\u865a\u6d6a\u5b50\u5fc3
\nweb\u5f00\u53d1\u5e94\u7528\u7a0b\u5e8f\uff08\u7f51\u7ad9\uff09\uff0c\u662f\u76ee\u524d\u5e94\u7528\u6700\u5e7f\u6cdb\u7684\u7a0b\u5e8f\u3002\u4f46\u662f\u5f00\u53d1\u8005\u7684\u6c34\u5e73\u53c2\u5dee\u4e0d\u9f50\uff0c\u5bfc\u81f4\u4e86\u5404\u79cd\u5404\u6837web\u6f0f\u6d1e\u7684\u51fa\u73b0\u3002\u672c\u6587\u7ad9\u5728\u5206\u5c42\u67b6\u6784\u7684\u89d2\u5ea6\uff0c\u5206\u6790\u4e00\u4e0b\u5982\u4f55\u5728java web\u7a0b\u5e8f\u4e2d\u627e\u5230\u7ecf\u5e38\u51fa\u73b0\u7684\u79cd\u79cd\u6f0f\u6d1e\u3002<\/p>\n

\u672c\u6587\u8ba8\u8bba\u7684\u53ea\u662fweb\u7a0b\u5e8f\u4e0a\u7684\u6f0f\u6d1e\uff0c\u548c\u5176\u5b83\u6f0f\u6d1e\uff0c\u662f\u76f8\u5bf9\u72ec\u7acb\u7684\u3002\u8fd9\u53e5\u8bdd\u770b\u4f3c\u5e9f\u8bdd\uff0c\u5b9e\u9645\u4e0a\u5374\u8bf4\u660e\u4e86\u65f6\u5e38\u88ab\u5ffd\u7565\u7684\u56e0\u7d20\uff0c\u5373\uff1a\u201c\u5f88\u591a\u4eba\u8ba4\u4e3a\u53ea\u8981\u6211\u5f00\u53d1web\u7a0b\u5e8f\u6ca1\u6709\u6f0f\u6d1e\uff0cweb\u670d\u52a1\u5668\u5c31\u5b89\u5168\u4e86\u201d\uff0c\u4e8b\u5b9e\u4e0a\uff0c\u5e76\u975e\u5982\u6b64\u3002\u4e00\u4e2a\u5408\u683c\u7684web\u7a0b\u5e8f\u5f00\u53d1\u4eba\u5458\uff0c\u5e94\u8be5\u65f6\u523b\u6e05\u695a\u81ea\u5df1\u5f00\u53d1\u7684\u7a0b\u5e8f\u4f1a\u5728\u4ec0\u4e48\u73af\u5883\u4e2d\u88ab\u4f7f\u7528\uff0c\u4ee5\u53ca\u4e00\u65e6\u81ea\u5df1\u7684\u7a0b\u5e8f\u4ea7\u751f\u67d0\u79cd\u6f0f\u6d1e\uff0c\u6700\u7ec8\u4f1a\u5bfc\u81f4\u4ec0\u4e48\u540e\u679c\u3002\u7b80\u5355\u7684\u8bf4\uff0cweb\u7a0b\u5e8f\u88ab\u5b89\u88c5\u5728\u4e00\u53f0\u6216\u591a\u53f0\uff08\u5206\u5e03\u5f0f\uff09web\u670d\u52a1\u5668\u4e0a\uff0c\u4e00\u65e6\u5b89\u88c5\u6210\u529f\uff0c\u5c31\u7b49\u4e8e\u5728\u4e3a\u5e7f\u5927\u7528\u6237\u63d0\u4f9b\u670d\u52a1\u7684\u540c\u65f6\uff0c\u7ed9\u5165\u4fb5\u8005\u6253\u5f00\u4e86\u4e00\u6761\u6216N\u6761\u65b0\u7684\u601d\u8def\u3002\u5982\u679c\u670d\u52a1\u5668\u7ba1\u7406\u5458\u521a\u597d\u5bf9\u5b89\u5168\u914d\u7f6e\u4e0d\u4e86\u89e3\uff08\u4e8b\u5b9e\u4e0a\uff0c\u56fd\u5185\u8fd9\u79cd\u7ba1\u7406\u5458\u5c45\u591a\uff09\uff0c\u90a3\u4e48\u53ea\u597d\u7531\u6211\u4eec\u7684\u7a0b\u5e8f\u6765\u5b88\u597d\u6700\u540e\u7684\u5173\u5361\u6700\u540e\u4e00\u9053\u9632\u7ebf\u3002<\/p>\n

\u770b\u4e86\u672c\u6587\u9898\u76ee\uff0c\u4e00\u5b9a\u6709\u4e00\u90e8\u5206\u4eba\u4f1a\u8ba4\u4e3a\uff0c\u201c\u4e0d\u5c31\u662f\u8bb2JSP\u6f0f\u6d1e\u4e48\uff0c\u7528\u5f97\u7740\u62ab\u7740\u8fd9\u4e48\u539a\u7684\u5305\u88c5\u4e48\uff1f\u201d\uff0c\u4e3a\u4e86\u56de\u7b54\u8fd9\u4e2a\u7591\u95ee\uff0c\u6211\u4eec\u5148\u770b\u770bJSP\u548cASP\u7684\u5f00\u53d1\u6709\u4ec0\u4e48\u4e0d\u540c\u5427\u3002\u5728ASP\u65f6\u4ee3\uff08ASP\uff0cPHP\u7b49\u8bed\u8a00\uff09\uff0c\u5f00\u53d1\u4e00\u5957\u7cfb\u7edf\u5f80\u5f80\u6ca1\u6709\u4fee\u6539\u5df2\u7ecf\u5199\u597d\u7684\u7cfb\u7edf\u75db\u82e6\u7684\u591a\uff0c\u56e0\u4e3a\u5b83\u4eec\u628a\u6240\u6709\u7684\u4ee3\u7801\uff08\u5305\u62ec\u94fe\u63a5\u6570\u636e\u5e93\u7684\u4ee3\u7801\u3001\u6267\u884cSQL\u8bed\u53e5\u7684\u4ee3\u7801\u3001\u63a7\u5236\u9875\u9762\u663e\u793a\u7684\u4ee3\u7801\uff09\u7edf\u7edf\u90fd\u653e\u5728<%……%>\u4e2d\uff0c\u6211\u4eec\u65f6\u5e38\u4f1a\u770b\u5230\u5982\u4e0b\u4ee3\u7801\u5757\uff1a
\n———–\u4ee3\u7801\u6765\u81ea\u67d0ASP\u6728\u9a6c———–
\nFunction GetFileSize(size)
\n Dim FileSize
\n FileSize=size \/ 1024
\n FileSize=FormatNumber(FileSize,2)
\n If FileSize < 1024 and FileSize > 1 then
\n GetFileSize="<font color=red>"& FileSize & "<\/font>&nbsp;KB"
\n ElseIf FileSize >1024 then
\n GetFileSize="<font color=red>"& FormatNumber(FileSize \/ 1024,2) & "<\/font>&nbsp;MB"
\n Else
\n GetFileSize="<font color=red>"& Size & "<\/font>&nbsp;Bytes"
\n End If
\nEnd Function
\n—————————————-
\n\u5982\u679c\u5ba2\u6237\u7684\u9700\u6c42\u53d8\u4e86\uff0c\u8981\u6c42\u9875\u9762\u4e0d\u80fd\u4f7f\u7528\u201c<font color=red>\u201d\u7b49\u6807\u7b7e\uff0c\u5168\u90e8\u5e94\u7528\u201cCSS\u201d\u663e\u793a\u3002\u6302\u4e86\uff0c\u628a\u7a0b\u5e8f\u5458\u53ec\u5524\u51fa\u6765\uff0c\u4e00\u4e2a\u4e00\u4e2a\u7684\u6539\u5427\u3002\u3002\u3002\u6ce8\u610f\uff0c\u8fd9\u91cc\u5f3a\u8c03\u4e0b\uff0c\u7279\u6307\u201c\u53ec\u5524\u7a0b\u5e8f\u5458\u201d\u624d\u80fd\u6539\uff0c\u5982\u679c\u662f\u5b66\u7f8e\u5de5\u7684\uff0c\u53ea\u4f1aHTML\u3001JS\u3001CSS\uff0c\u5b8c\u4e86\uff0c\u8fd9\u6d3b\u8fd8\u5e72\u4e0d\u6210\u3002\u800c\u8fd9\u4e9b\u53ea\u662f\u7b80\u5355\u7684\u9875\u9762\u4fee\u6539\uff0c\u5982\u679c\u5ba2\u6237\u4eca\u5929\u8bf4\uff0cMYSQL\u670d\u52a1\u5668\u627f\u62c5\u4e0d\u4e86\u8fd9\u4e2a\u6570\u636e\u91cf\uff0c\u8981\u6302Oracle\uff0c\u53ef\u601c\u7684\u7a0b\u5e8f\u5458\u5c31\u8981\u5728\u4e00\u7247\u4e00\u7247\u7684\u4ee3\u7801\u6d77\u6d0b\u91cc\u5bfb\u627e\u6267\u884cSQL\u8bed\u53e5\u7684\u4ee3\u7801\uff0c\u800c\u6bcf\u4e00\u4e2a\u6587\u4ef6\u90fd\u53ef\u80fd\u5b58\u653e\u7740SQL\u8bed\u53e5\uff0c\u610f\u5473\u7740\u6bcf\u4e00\u4e2a\u6587\u4ef6\u90fd\u53ef\u80fd\u5728\u53d7SQL\u6ce8\u5165\u7684\u5a01\u80c1\u3002<\/p>\n

JSP\u91c7\u7528MVC\u6a21\u5f0f\u5206\u5c42\u67b6\u6784\u8fdb\u884c\u5f00\u53d1\uff0c\u5c31\u53ef\u4ee5\u628a\u6240\u6709\u7684\u6587\u4ef6\u5206\u5f00\uff0c\u6839\u636e\u5176\u7528\u9014\uff0c\u5206\u522b\u653e\u5728\u4e0d\u540c\u7684\u6587\u4ef6\u5939\u4e0b\uff08\u5206\u5c42\uff09\uff0c\u6bcf\u4e2a\u6587\u4ef6\u5939\u4e0b\u7684\u6587\u4ef6\u53ea\u8d1f\u8d23\u81ea\u5df1\u7684\u4e8b\u60c5\u3002\u4f8b\u5982\u6570\u636e\u8bbf\u95ee\u5c42\u7684\u4ee3\u7801\u5c31\u653e\u5728\u6570\u636e\u8bbf\u95ee\u5c42\u7684\u6587\u4ef6\u5939\u4e0b\uff0c\u4e1a\u52a1\u903b\u8f91\u5c42\u7684\u4ee3\u7801\u4e5f\u90fd\u653e\u5728\u81ea\u5df1\u7684\u6587\u4ef6\u5939\u4e0b\uff0c\u5f53\u663e\u793a\u5c42\uff08\u8fd9\u4e00\u5c42\u662f\u4e3a\u4e86\u628a\u6700\u7ec8\u7684\u8fd0\u7b97\u7ed3\u679c\u663e\u793a\u7ed9\u7528\u6237\u770b\uff09\u7684\u9700\u6c42\u53d1\u751f\u53d8\u5316\uff0c\u5c31\u50cf\u524d\u9762\u7684\u5ba2\u6237\u9700\u6c42\uff0c\u6211\u4eec\u53ea\u8981\u4fee\u6539\u8fd9\u4e00\u5c42\u7684\u6587\u4ef6\u5c31\u662f\u4e86\uff0c\u5176\u4ed6\u5c42\u7684\u4ee3\u7801\u6839\u672c\u4e0d\u9700\u8981\u52a8\uff0c\u800c\u4fee\u6539\u8005\u4e5f\u4e0d\u9700\u8981\u61c2\u5f97\u5176\u5b83\u5c42\u7684\u4ee3\u7801\u3002<\/p>\n

\u4ee3\u7801\u5206\u5c42\u4e86\uff0c\u610f\u5473\u7740\u6f0f\u6d1e\u4e5f\u5728\u8ddf\u7740\u5206\u5c42\uff0c\u6211\u4eec\u5bfb\u627eJSP\u6f0f\u6d1e\u7684\u601d\u8def\u4e5f\u8981\u8ddf\u7740\u5206\u5c42\uff0c\u624d\u80fd\u4e0e\u65f6\u4ff1\u8fdb\u3002<\/p>\n

\u4e0b\u9762\u5728\u8bb2\u8ff0\u5bfb\u627e\u6f0f\u6d1e\u7684\u8fc7\u7a0b\u4e2d\uff0c\u672c\u6587\u5c31\u62ff\u4e00\u4e2a\u7b80\u5355\u7684\u5206\u5c42\u67b6\u6784\u4f8b\u5b50\u6765\u505a\u6837\u677f\u3002\u6837\u677f\u7a0b\u5e8f\u7684\u540d\u79f0\u4e3a\u201cXX\u6587\u7ae0\u7cfb\u7edf\u201d\uff0c\u7cfb\u7edf\u4f7f\u7528\u4e86STRUTS\u6846\u67b6\uff0c\u548c\u5b89\u5168\u6709\u5173\u7684\u5c42\u5206\u4e3a\uff1a
\n\u201cDB\u5c42<\/b>\u201d\uff0c\u8fd9\u4e00\u5c42\u5b58\u653e\u4e86\u94fe\u63a5\u6570\u636e\u5e93\u7684\u5b57\u7b26\u4e32\uff0c\u4ee5\u53caJdbcTemplate\u7c7b\uff0c\u76f4\u63a5\u8bbf\u95ee\u6570\u636e\u5e93\u3002\u56e0\u4e3a\u5728java\u4e2d\uff0c\u6267\u884cSQL\u8bed\u53e5\u7684\u51fd\u6570\u6309\u7167\u8fd4\u56de\u503c\u53ef\u4ee5\u5206\u4e3a\u4e09\u7c7b\uff0c\u6240\u4ee5\u5728\u8fd9\u4e00\u5c42\u5b9a\u4e49\u4e86JDBC\u6a21\u7248\u7c7b\uff08JdbcTemplate\uff09\uff0c\u6bcf\u4e00\u6b21\u4f7f\u7528\u64cd\u4f5c\u6570\u636e\u5e93\u65f6\u90fd\u8981\u6267\u884c\u8fd9\u4e00\u5c42\u7684\u4e09\u4e2a\u65b9\u6cd5\u5176\u4e2d\u4e00\u4e2a\u3002
\n\u201cDAO\u5c42<\/b>\uff08Data Access Object\u6570\u636e\u8bbf\u95ee\u5bf9\u8c61\u5c42\uff09\u201d\uff0c\u4ece\u5b89\u5168\u89d2\u5ea6\u4e0a\u770b\uff0c\u8fd9\u4e00\u5c42\u5b58\u653e\u4e86SQL\u8bed\u53e5\uff08\u5e76\u4e0d\u6267\u884cSQL\u8bed\u53e5\uff0c\u8bed\u53e5\u4f20\u7ed9DB\u5c42\u6267\u884c\uff09\u3002\u8fd9\u4e00\u5c42\u8c03\u7528\u201cDB\u5c42\u201d\u8bbf\u95ee\u6570\u636e\u5e93\uff0c\u5b83\u53ea\u77e5\u9053\u201cDB\u5c42\u201d\u7684\u5b58\u5728\uff0c\u4e0d\u77e5\u9053\u6570\u636e\u5e93\u7684\u5b58\u5728\u3002
\n\u201cSERVICE\u5c42<\/b>\u201d\uff0c\u4e1a\u52a1\u903b\u8f91\u5c42\uff0c\u56e0\u4e3a\u4e00\u4e2a\u4e1a\u52a1\u7684\u5b9e\u73b0\uff0c\u5e76\u4e0d\u662f\u4e00\u6b21\u6570\u636e\u5e93\u8bbf\u95ee\u5c31\u53ef\u4ee5\u5b8c\u6210\u7684\uff0c\u6240\u4ee5\u8fd9\u4e00\u5c42\u901a\u8fc7N\u6b21\u8c03\u7528\u201cDAO\u5c42\u7684\u65b9\u6cd5\u201d\u5b9e\u73b0\u4e1a\u52a1\u903b\u8f91\uff0c\u5b83\u53ea\u77e5\u9053\u201cDAO\u5c42\u201d\u7684\u5b58\u5728\uff0c\u4e0d\u77e5\u9053\u201cDB\u5c42\u201d\u548c\u6570\u636e\u5e93\u7684\u5b58\u5728\u3002
\n\u201cACTION\u5c42<\/b>\u201d\uff0c\u8c03\u7528\u4e1a\u52a1\u903b\u8f91\u5c42\uff0c\u6839\u636e\u8fd4\u56de\u7684\u7ed3\u679c\uff0c\u63a7\u5236JSP\u9875\u9762\u663e\u793a\u3002\u5b83\u53ea\u77e5\u9053\u4e1a\u52a1\u5c42\u7684\u5b58\u5728\u3002\u8fd9\u4e00\u5c42\u662f\u5165\u4fb5\u8005\u7684\u653b\u51fb\u5e73\u53f0\u3002
\n\u201cForm\u5c42<\/b>\u201d\uff0c\u628a\u7528\u6237POST\u63d0\u4ea4\u7684\u4fe1\u606f\u5c01\u88c5\u6210Form\u5bf9\u8c61\uff0c\u7ecf\u8fc7\u9a8c\u8bc1\u540e\u63d0\u4ea4\u7ed9ACTION\u5c42\u5904\u7406\u3002
\n\u201cJSP\u5c42<\/b>\u201d(\u663e\u793a\u5c42)\uff0c\u8fd9\u4e00\u5c42\u662f\u6700\u7ec8\u663e\u793a\u7ed9\u7528\u6237\u770b\u7684\u9875\u9762\uff0c\u540c\u65f6\u4e5f\u662f\u5165\u4fb5\u8005\u7684\u653b\u51fb\u5e73\u53f0\u3002
\n\u5728\u6536\u5230GET\u8bf7\u6c42\u540e\uff0c\u7528\u6237\u8bbf\u95eeACTION\u5c42\uff0c\u81ea\u52a8\u4f1a\u53d1\u751f\uff1a\u201cACTION\u8c03\u7528SERVICE\uff0cSERVICE\u8c03\u7528DAO\uff0cDAO\u8c03\u7528DB\uff0cDB\u6267\u884cSQL\u8bed\u53e5\u8fd4\u56de\u7ed3\u679c\u7ed9DAO\uff0cDAO\u8fd4\u56de\u7ed9SERVICE\uff0cSERVICE\u8fd4\u56de\u7ed9ACTION\uff0cACTION\u628a\u6570\u636e\u663e\u793a\u5230JSP\u91cc\u8fd4\u56de\u7ed9\u7528\u6237\u201d\u3002
\n\u5728\u6536\u5230POST\u8bf7\u6c42\u540e\uff0c\u7528\u6237\u63d0\u4ea4\u7684\u8868\u5355\u4f1a\u88ab\u5c01\u88c5\u6210form\u5bf9\u8c61\uff0c\u5728\u5c01\u88c5\u7684\u65f6\u5019\uff0c\u8c03\u7528form\u7c7b\u4e2d\u7684\u9a8c\u8bc1\u65b9\u6cd5\u5bf9\u63d0\u4ea4\u53c2\u6570\u8fdb\u884c\u9a8c\u8bc1\uff0c\u7136\u540e\u628aform\u5bf9\u8c61\u6254\u7ed9ACTION\u5c42\uff0c\u7ee7\u7eed\u6267\u884cGET\u8bf7\u6c42\u540e\u9762\u7684\u6b65\u9aa4\u3002<\/p>\n

\u6709\u4e86\u6837\u677f\uff0c\u6211\u4eec\u6765\u5206\u6790\u8fd9\u5957\u7a0b\u5e8f\u4e2d\u53ef\u80fd\u51fa\u73b0\u7684\u5404\u79cdweb\u6f0f\u6d1e\u3002<\/p>\n

1\uff0cSQL\u6ce8\u5165\u6f0f\u6d1e\u3002<\/b>
\n\u4eceSQL\u6ce8\u5165\u6f0f\u6d1e\u8bf4\u8d77\u5427\uff0c\u5728web\u6f0f\u6d1e\u91cc\uff0cSQL\u6ce8\u5165\u662f\u6700\u5bb9\u6613\u88ab\u5229\u7528\u800c\u53c8\u6700\u5177\u6709\u5371\u5bb3\u6027\u7684\u3002\u600e\u4e48\u5feb\u901f\u7684\u627e\u5230\u5462\uff1f\u5148\u5206\u6790\u6d41\u7a0b\uff0c\u5c31\u62ff\u7528\u6237\u67e5\u770b\u6587\u7ae0\u8fd9\u4e2a\u6d41\u7a0b\u4e3a\u4f8b\uff1a\u7528\u6237\u8bbf\u95ee\u4e00\u4e2aaction\uff0c\u544a\u8bc9\u5b83\u7528\u6237\u60f3\u770bID\u4e3a7\u7684\u6587\u7ae0\uff0c\u8fd9\u4e2aaction\u5c31\u4f1a\u7ee7\u7eed\u5b8c\u6210\u524d\u9762\u6240\u8bf4\u7684\u6d41\u7a0b\u3002<\/p>\n

\u5982\u679c\u662fASP\u7a0b\u5e8f\uff0c\u8fd9\u5c31\u662f\u6700\u5bb9\u6613\u4ea7\u751f\u95ee\u9898\u7684\u65f6\u5019\uff0cASP\u662f\u5f31\u7c7b\u578b\uff0c\u63a5\u5230\u53c2\u6570\u540e\u4e0d\u9700\u8981\u8f6c\u6362\u7c7b\u578b\uff0c\u5c31\u548cSQL\u8bed\u53e5\u8fde\u52a0\u8d77\u6765\u3002\u4f46\u662fJSP\u5c31\u4e0d\u4e00\u6837\uff0cJSP\u662f\u5f3a\u7c7b\u578b\u7684\u8bed\u8a00\uff0c\u63a5\u53d7\u6709\u5bb3\u7684\u53c2\u6570\u540e\uff1a\u5bf9\u4e8eGET\u8bf7\u6c42\uff08\u76f4\u63a5\u5728\u5730\u5740\u680f\u8bbf\u95ee\u9875\u9762\uff09\uff0c\u5982\u679c\u8fd9\u91cc\u8981\u7684\u662fint\u578b\uff0c\u5373\u4f7f\u4e0d\u61c2\u5b89\u5168\u7684\u7a0b\u5e8f\u5458\uff0c\u4e5f\u4f1a\u628a\u5b83\uff08\u6587\u7ae0\u7684ID\uff09\u7acb\u523b\u8f6c\u6362\u6210int\uff0c\u56e0\u4e3a\u8fd9\u91cc\u8f6c\u6362\u540e\u5728\u540e\u9762\u7684\u5904\u7406\u4e2d\u4f1a\u66f4\u5bb9\u6613\u64cd\u4f5c\uff0c\u800c\u8fd9\u65f6\u7a0b\u5e8f\u5c31\u51fa\u9519\u4e86\uff1b\u5bf9\u4e8ePOST\u8bf7\u6c42\uff08\u63d0\u4ea4\u8868\u5355\uff09\uff0c\u5982\u679c\u8fd9\u91cc\u8981\u7684\u662fint\u578b\uff0c\u7a0b\u5e8f\u4f1a\u5728\u628a\u5b83\u5c01\u88c5\u6210Form\u5bf9\u8c61\u65f6\uff0c\u56e0\u4e3a\u81ea\u52a8\u8981\u8fdb\u884c\u7c7b\u578b\u8f6c\u5316\uff0c\u540c\u6837\u53d1\u751f\u9519\u8bef\uff0c\u8fd9\u4e24\u79cd\u9519\u8bef\u53d1\u751f\u540e\uff0c\u6839\u672c\u4e0d\u4f1a\u8bbf\u95ee\u540e\u9762\u7684\u6d41\u7a0b\uff0c\u5c31\u629b\u51fa\u5f02\u5e38\u8df3\u51fa\u4e86\uff0c\u6216\u8bb8\u8fd9\u5c31\u662fJSP\u5929\u751f\u7684\u5b89\u5168\u6027\u3002\u6240\u4ee5\uff0c\u901a\u5e38\u63d0\u4ea4\u7684\u53d8\u91cf\u662fint\u65f6\uff0c\u4e0d\u4f1a\u53d1\u751f\u95ee\u9898\uff0c\u95ee\u9898\u4f1a\u51fa\u73b0\u5728string\u53c2\u6570\u8fd9\u91cc\uff0c\u5982\u679c\u8981\u67e5\u770b\u67d0\u7528\u6237\u7684\u4fe1\u606f\uff0c\u7a0b\u5e8f\u53ef\u80fd\u4f1a\u8ba9\u4f60\u63d0\u4ea4\u5982\u4e0b\u53c2\u6570\uff1ashowuser.do?username=kxlzx\u3002\u95ee\u9898\u6765\u4e86\uff0c\u56e0\u4e3a\u8fd9\u91cc\u662fstring\u7c7b\u578b\uff0c\u6240\u4ee5\u4e0d\u61c2\u5b89\u5168\u7684\u7a0b\u5e8f\u5458\u9876\u591a\u4f1a\u5224\u65ad\u4e00\u4e0b\u662f\u4e0d\u662f\u7a7a\uff0c\u5c31\u8fde\u52a0\u6210\u4e3aSQL\u8bed\u53e5\u3002\u6709\u6f0f\u6d1e\u7684\u7a0b\u5e8f\u5927\u6982\u4f1a\u5199\u6210\u8fd9\u4e2a\u6837\u5b50\uff1a
\nACTION\u7684\u4ee3\u7801\uff1ashowuser.do
\n String username = null;
\n username = request.getParameter("username");
\n Service service = new Service();
\n service.findByUsername(username);
\n\u5f97\u5230\u53c2\u6570\u540e\u8c03\u7528service\uff08\u4ee3\u7801\u7565\uff09,service\u5c42\u76f4\u63a5\u4ea4\u7ed9\u4e86Dao\u5c42\uff0cdao\u7684\u4ee3\u7801\uff1a
\n public Object findByUsername(String username)
\n {
\n JdbcTemplate jt=new JdbcTemplate();
\n String sql = "select * from Users where username=’"+username"’";
\n List list = jt.query(sql);
\n ……………….
\n }
\ndao\u8c03\u7528\u4e86DB\u5c42\u7684JdbcTemplate\uff0c\u628aSQL\u8bed\u53e5\u62fc\u597d\u540e\uff0c\u4f20\u7ed9\u4e86JdbcTemplate\u53bb\u6267\u884c\u3002\u4e0d\u7528\u518d\u770b\u8fd9\u91cc\u7684JdbcTemplate\uff0c\u5c31\u53ef\u4ee5\u77e5\u9053\u91cc\u9762\u7684\u4ee3\u7801\u4f7f\u7528\u4e86Statement\u7c7b\u7684executequery()\u65b9\u6cd5\u6267\u884c\uff0c\u6700\u7ec8\u5bfc\u81f4\u4e86SQL\u6ce8\u5165\u6f0f\u6d1e\u3002<\/p>\n

\u5206\u6790\u4e86\u8fd9\u4e48\u534a\u5929\uff0c\u6709\u8bfb\u8005\u4f1a\u95ee\uff1a\u201c\u96be\u9053\u6211\u8981\u8d39\u8fd9\u4e48\u5927\u7684\u529b\u6c14\u624d\u80fd\u627e\u5230\u6f0f\u6d1e\u4e48\uff1f\u201d\u3002\u7684\u786e\uff0c\u901a\u5e38\u5728ASP\u7a0b\u5e8f\u91cc\u627e\u6ce8\u5165\u65f6\u7684\u601d\u8def\u5c31\u662f\u8fd9\u6837\u5b50\uff0c\u4f46\u662f\u6211\u4eec\u73b0\u5728\u662f\u5728\u4f7f\u7528\u4e86\u5f00\u53d1\u6a21\u5f0f\u5206\u5c42\u67b6\u6784\u7684JSP\u7a0b\u5e8f\u91cc\uff0c\u5e94\u8be5\u6309\u7167\u5206\u5c42\u67b6\u6784\u7684\u601d\u7ef4\u53bb\u627e\u6f0f\u6d1e\u3002\u5728\u56de\u7b54\u8fd9\u4e2a\u95ee\u9898\u4e4b\u524d\uff0c\u6211\u4eec\u8fd8\u5f97\u7ed5\u4e2a\u5f2f\u5b50\uff0c\u770b\u770b\u600e\u4e48\u5728\u8fd9\u91cc\u9884\u9632SQL\u6ce8\u5165\uff08java\u59cb\u7ec8\u90fd\u662f\u8fd9\u4e48\u4f18\u7f8e\uff0c\u5b83\u4e0d\u4f1a\u76f4\u63a5\u544a\u8bc9\u4f60\u7b54\u6848\uff0c\u800c\u662f\u4e00\u5c42\u4e00\u5c42\u7684\u8ba9\u4f60\u62e8\u5f00\u4e91\u96fe\uff09\u3002<\/p>\n

\u521a\u624d\u5206\u6790\u6d41\u7a0b\uff0c\u662f\u4ece\u6b63\u5411\u5206\u6790\u7684\uff0c\u4ece\u7528\u6237\u8f93\u5165\u5230\u4ea7\u751f\u6f0f\u6d1e\uff0c\u6211\u4eec\u5728\u9632\u5fa1\u7684\u65f6\u5019\uff0c\u4e0d\u59a8\u5012\u8fc7\u6765\u770b\u770b\uff0c\u4eceDB\u5c42\u5165\u624b\u3002JdbcTemplate\u8c03\u7528\u6267\u884cSQL\u8bed\u53e5\uff0c\u53ef\u4ee5\u6709\u4e24\u4e2a\u7c7b\u4f9b\u6211\u4eec\u9009\u62e9\uff0c\u4e00\u4e2a\u662fStatement\uff0c\u53e6\u4e00\u4e2a\u5c31\u662f\u9884\u5904\u7406\u7684Statement\uff0c\u4e24\u8005\u6709\u7740\u6548\u7387\u4e0a\u548c\u5b89\u5168\u4e0a\u7684\u663e\u8457\u5dee\u522b\u3002\u5728\u6548\u7387\u4e0a\uff0c\u53ea\u8981\u6570\u636e\u5e93\u652f\u6301\u9884\u5904\u7406\u6280\u672f\uff08sqlserver\uff0cmysql\uff0coracle\u7b49\u90fd\u652f\u6301\uff0c\u53ea\u6709\u5c11\u6570access\u7b49\u4e0d\u652f\u6301\uff09\uff0c\u5c31\u4f1a\u5728\u5927\u91cf\u6267\u884cSQL\u8bed\u53e5\u65f6\u589e\u52a0\u901f\u5ea6\uff1b\u5728\u5b89\u5168\u4e0a\uff0c\u4f7f\u7528\u9884\u5904\u7406\uff0c\u4f1a\u628a\u63a5\u53d7\u7684\u53c2\u6570\u4e5f\u7ecf\u8fc7\u9884\u5904\u7406\uff0c\u4ece\u800c\u4e0d\u4f1a\u4f5c\u4e3aSQL\u8bed\u53e5\u7684\u4e00\u90e8\u5206\u6267\u884c\uff0c\u800c\u662f\u4ec5\u4ec5\u4f5c\u4e3aSQL\u8bed\u53e5\u4e2d\u7684\u53c2\u6570\u90e8\u5206\u5185\u5bb9\u88ab\u6267\u884c\u3002\u4e00\u65e6DB\u5c42\u4f7f\u7528\u4e86\u9884\u5904\u7406\uff0cDAO\u5c42\u7684SQL\u8bed\u53e5\u4e5f\u4f1a\u53d1\u751f\u53d8\u5316\uff0c\u6210\u4e3a\u8fd9\u4e2a\u6837\u5b50\uff1a
\n public Object findByUsername(String username)
\n {
\n JdbcTemplate jt=new JdbcTemplate();
\n String sql = "select * from Users where username=?";
\n List list = jt.query(sql,new Object[1]{username});
\n ……………….
\n }
\n\u8fd9\u6837\uff0cSQL\u6ce8\u5165\u5c31\u548c\u6211\u4eec\u7684\u7a0b\u5e8f\u51e0\u4e4e\u65e0\u5173\u4e86\uff0c\u6ce8\u610f\u6211\u8bf4\u7684\u662f\u51e0\u4e4e\uff0c\u800c\u4e0d\u662f\u5168\u90e8\u3002\u77e5\u9053\u4e86\u600e\u4e48\u9632\u5fa1\uff0c\u4e8e\u662f\u4e00\u5207\u5728\u8fd9\u91cc\u53d8\u7684\u7b80\u5355\u6781\u4e86\uff0c\u6211\u4eec\u5e94\u8be5\u76f4\u63a5\u53bbDB\u5c42\u627e\u5230JdbcTemplate\uff0c\u770b\u770b\u4ee3\u7801\uff0c\u4e00\u65e6\u4f7f\u7528\u4e86Statement\uff0c\u5f88\u597d\uff0c\u8fd9\u4e2a\u7cfb\u7edf\u5341\u6709\u516b\u4e5d\u6709\u6f0f\u6d1e\uff0c\u5bf9\u4e8eGET\u8bf7\u6c42\uff0c\u4e0b\u9762\u8981\u505a\u7684\u662f\u4f7f\u7528Editplus\u641c\u7d22\u201crequest.getParameter\u201d\uff0c\u5bf9\u4e8ePOST\u8bf7\u6c42\uff0c\u5c31\u6253\u5f00\u6240\u6709\u7684FORM\u5c42\u5bfb\u627e\u9a8c\u8bc1\u65b9\u6cd5\uff08validate\u65b9\u6cd5\u4e13\u95e8\u7528\u4e8e\u9a8c\u8bc1\uff09\uff0c\u5982\u679c\u9a8c\u8bc1\u5199\u7684\u6709\u95ee\u9898\uff0c\u5c31\u4f1a\u5bfc\u81f4\u6f0f\u6d1e\u51fa\u73b0\u3002\u6ca1\u6709\u4f7f\u7528\u9884\u5904\u7406\u7684\u7cfb\u7edf\uff0c\u53ef\u80fd\u4f1a\u5728action\u5c42\u548cform\u5c42\u8fdb\u884c\u9632\u5fa1\uff0c\u5bf9\u53c2\u6570\u8fc7\u6ee4\uff0c\u4f46\u603b\u6709\u9632\u5fa1\u4e0d\u5230\u7684\u65f6\u5019\uff0c\u56e0\u4e3a\u6218\u7ebf\u62c9\u7684\u592a\u957f\u4e86\uff0c\u6bcf\u4e00\u4e2aaction\u90fd\u53ef\u80fd\u63a5\u53d7\u53c2\u6570\u5e76\u5b58\u5728\u6f0f\u6d1e\u3002<\/p>\n

\u8fd8\u6709\u4e00\u79cd\u60c5\u51b5\uff0c\u7cfb\u7edf\u4e00\u90e8\u5206\u4f7f\u7528\u4e86\u9884\u5904\u7406\uff0c\u4e00\u90e8\u5206\u6ca1\u6709\uff0c\u8fd9\u6837\u7684\u60c5\u51b5\u53ef\u80fd\u662f\u56e0\u4e3a\u9879\u76ee\u8d76\u7684\u6bd4\u8f83\u4ed3\u4fc3\uff0c\u4eba\u5458\u6ca1\u6709\u7ecf\u8fc7\u6b63\u89c4\u57f9\u8bad\uff0c\u6700\u540e\u8270\u96be\u7684\u6574\u5408\u5230\u4e86\u4e00\u8d77\u3002\u8fd9\u79cd\u60c5\u51b5\u4e5f\u597d\u529e\uff0c\u76f4\u63a5\u5728DAO\u5c42\u641c\u7d22\uff08"’\uff09\u6216\uff08’"\uff09\uff0c\u8fd9\u4e9b\u7b26\u53f7\u7528\u4e8e\u548c\u5b57\u7b26\u4e32\u53d8\u91cf\u8fde\u52a0\uff0c\u62fcSQL\u8bed\u53e5\uff0c\u80af\u5b9a\u662f\u8fd9\u4e9b\u8bed\u53e5\u4e4b\u540e\u7684\u4ee3\u7801\u4f7f\u7528\u4e86Statement\u3002\u7136\u540e\u518d\u5f80\u4e0a\u5c42\u627e\uff0c\u770b\u770b\u54ea\u4e2aaction\u8c03\u7528\u4e86\u8fd9\u4e2a\u6709\u95ee\u9898\u7684dao\u7c7b\uff0c\u4e5f\u53ef\u80fd\u53d1\u751fSQL\u6ce8\u5165\u3002<\/p>\n

\u5373\u4f7f\u7cfb\u7edf\u4f7f\u7528\u4e86\u9884\u5904\u7406\uff0c\u522b\u5fd8\u4e86\uff0c\u7a0b\u5e8f\u7ed9\u5ba2\u6237\u4f7f\u7528\u540e\uff0c\u5ba2\u6237\u6709\u6743\u5229\u53bb\u6269\u5c55\u7684\u3002\u7a0b\u5e8f\u62ff\u5230\u5ba2\u6237\u90a3\u91cc\uff0c\u5ba2\u6237\u6709\u4e86\u65b0\u7684\u9700\u6c42\uff0c\u800c\u8fd9\u4e2a\u9700\u6c42\u53c8\u4e0d\u5927\uff0c\u5f88\u53ef\u80fd\u4e0d\u613f\u610f\u82b1\u94b1\u91cd\u65b0\u96c7\u4eba\u6765\u5b9e\u73b0\u6269\u5c55\u529f\u80fd\uff0c\u5728\u8fd9\u4e2a\u65f6\u5019\u4e5f\u53ef\u80fd\u51fa\u73b0\u95ee\u9898\uff0c\u5ba2\u6237\u4f7f\u7528\u81ea\u5df1\u7684\u7a0b\u5e8f\u5458\u6269\u5c55AJAX\u529f\u80fd\uff0c\u8fd9\u4e2a\u7a0b\u5e8f\u5458\u56e0\u4e3a\u6015\u51fa\u95ee\u9898\uff0c\u4e0d\u6562\u52a8\u6e90\u7a0b\u5e8f\uff0c\u5c31\u5728web.xml\u91cc\u52a0\u4e86\u4e00\u4e2aservlet\uff0c\u8fd9\u4e2aservlet\u76f4\u63a5\u53bb\u8c03\u7528conn\u3002\u53ef\u6015\u7684\u4e8b\u60c5\u53d1\u751f\u4e86\u3002\u6240\u4ee5\uff0c\u6211\u4eec\u7684\u641c\u7d22\u6f0f\u6d1e\u89c4\u5219\u4e2d\u53c8\u52a0\u4e0a\u4e86\u4e00\u6761\uff0c\u5728\u975edao\u5c42\u7684\u6587\u4ef6\u4e2d\uff0c\u641c\u7d22\u201cselect\uff0cupdate\uff0cdelete\u201d\u7b49\u5b57\u7b26\u4e32\u3002<\/p>\n

2\uff0c\u66b4\u9732\u7a0b\u5e8f\u4fe1\u606f\u6f0f\u6d1e\u3002<\/b>
\n\u8fd9\u4e2a\u6f0f\u6d1e\u662f\u600e\u4e48\u6765\u7684\u5462\uff1f\u6211\u4eec\u9700\u8981\u4ece\u5f02\u5e38\u8bf4\u8d77\u3002\u6709\u7ecf\u9a8c\u7684\u5165\u4fb5\u8005\uff0c\u53ef\u4ee5\u4eceJSP\u7a0b\u5e8f\u7684\u5f02\u5e38\u4e2d\u83b7\u53d6\u5f88\u591a\u4fe1\u606f\uff0c\u6bd4\u5982\u7a0b\u5e8f\u7684\u90e8\u5206\u67b6\u6784\u3001\u7a0b\u5e8f\u7684\u7269\u7406\u8def\u5f84\u3001SQL\u6ce8\u5165\u7206\u51fa\u6765\u7684\u4fe1\u606f\u7b49\uff0c\u8fd9\u4e2a\u6f0f\u6d1e\u5f88\u5bb9\u6613\u9632\u5fa1\uff0c\u5374\u5f88\u96be\u5feb\u901f\u5b9a\u4f4d\u6f0f\u6d1e\u6587\u4ef6\u3002\u51fa\u73b0\u8fd9\u6837\u6f0f\u6d1e\u7684\u65f6\u5019\uff0c\u901a\u5e38\u662f\u6211\u4eec\u5728\u5199\u4ee3\u7801\u7684\u65f6\u5019\uff0c\u5c11\u4e86\u4e00\u4e9b\u53ef\u80fd\u6027\u7684\u8003\u8651\u800c\u5bfc\u81f4\u7684\u3002\u8fd9\u6837\u7684\u95ee\u9898\u90fd\u662f\u7ecf\u9a8c\u9020\u6210\u7684\uff0c\u800c\u5bfb\u627e\u6f0f\u6d1e\u4e5f\u8981\u901a\u8fc7\u7ecf\u9a8c\u52a0\u8fd0\u6c14\uff08\u8981\u6709\u4ed9\u7f18\u3002\u3002\u3002\uff09\uff0c\u6211\u4e2a\u4eba\u6280\u672f\u6709\u9650\uff0c\u5c31\u4e0d\u591a\u8bf4\u4e86\u3002\u9632\u5fa1\u7684\u65b9\u6cd5\u5c31\u662f\u5728\u7a0b\u5e8f\u4e2d\u52a0\u4e0a\u201cException\u5c42\u201d\uff0c\u81ea\u5b9a\u4e49\u5f02\u5e38\uff0c\u628a\u7cfb\u7edf\u4ea7\u751f\u7684\u5f02\u5e38\u7edf\u7edf\u5305\u88c5\u8d77\u6765\uff0c\u4e0d\u8981\u653e\u8fc7\u4efb\u4f55\u4e00\u4e2a\u53ef\u80fd\u4ea7\u751f\u5f02\u5e38\u7684\u5730\u65b9\u3002\u50cf\u817e\u8baf\u7684\u5f02\u5e38\u5c31\u5305\u88c5\u7684\u5f88\u597d\u201c\u5bf9\u4e0d\u8d77\uff0c\u4eca\u5929\u7684\u6ce8\u518c\u4eba\u6570\u5df2\u7ecf\u8fbe\u5230\u5341\u4e07\uff0c\u8bf7\u60a8\u660e\u5929\u518d\u6765\u3002\u3002\u3002\u201d\uff0c\u5e9f\u8bdd\uff0c\u65e5\u6ce8\u518c\u91cf\u90fd\u5341\u4e07\uff0c\u8fd8\u8ba9\u4e0d\u8ba9\u4eba\u6d3b\u5566\uff0c\u94c1\u5b9a\u662f\u7a0b\u5e8f\u53d1\u751f\u4e86\u5f02\u5e38\uff0c\u4e0d\u6562\u8ba9\u5404\u4f4d\u5927\u5927\u4eec\u770b\u5230\u771f\u5b9e\u7684\u9762\u5b54\u3002<\/p>\n

3\uff0cAJAX\u66b4\u9732\u51fa\u6765\u7684\u6f0f\u6d1e\u3002<\/b>
\n\u524d\u9762\u8bb2SQL\u6ce8\u5165\u7684\u65f6\u5019\u8bf4\u8fc7\u7684\u4f8b\u5b50\u5c31\u662f\u4e00\u4e2a\u5178\u578b\u7684\u60c5\u51b5\uff0c\u56e0\u4e3a\u5927\u591a\u6570\u7f51\u7ad9\u4e0d\u662f\u5728\u5f00\u53d1\u65f6\u5c31\u62e5\u6709Ajax\u6280\u672f\u7684\uff0c\u90fd\u662f\u540e\u6765\u770b\u5927\u5bb6\u90fd\u7528\u4e86\uff0c\u8d76\u65f6\u9ae6\u52a0\u4e0a\u3002\u4f46\u662f\u5728\u52a0\u4e0a\u7684\u540c\u65f6\u6ca1\u6709\u610f\u8bc6\u5230\uff0c\u5728web\u4e0a\u589e\u52a0\u4e00\u4e2a\u6587\u4ef6\uff0c\u5c31\u7b49\u4e8e\u6269\u5c55\u4e86\u4e00\u70b9\u653b\u51fb\u9762\u3002\u5728\u8fd9\u91cc\u6211\u5c31\u4e0d\u591a\u8bf4\u4e86\uff0c\u8bf7\u53c2\u8003IT168\u7684AJAX\u5b89\u5168\u4e13\u9898\u3002http:\/\/www4.it168.com\/jtzt\/shenlan\/safe\/ajax<\/p>\n

4\uff0c\u4e1a\u52a1\u903b\u8f91\u6f0f\u6d1e\u3002<\/b>
\n\u8fd9\u4e2a\u8bcd\u770b\u8d77\u6765\u633a\u62bd\u8c61\u7684\uff0c\u4ed6\u548c\u201c\u66b4\u9732\u7a0b\u5e8f\u4fe1\u606f\u6f0f\u6d1e\u201d\u6709\u5f88\u591a\u5171\u540c\u70b9\uff0c\u770b\u540d\u5b57\u5c31\u77e5\u9053\uff0c\u5e94\u8be5\u662f\u5b58\u5728\u4e8e\u4e1a\u52a1\u903b\u8f91\u5c42\uff08service\u5c42\uff09\u7684\u6f0f\u6d1e\u3002\u8fd9\u6837\u7684\u6f0f\u6d1e\u90fd\u548c\u7a0b\u5e8f\u7684\u8fd0\u884c\u903b\u8f91\u6709\u5173\uff0c\u4e3e\u4e00\u4e2a\u4f8b\u5b50\u3002<\/p>\n

\u5c0f\u738b\u7ed9\u5c0f\u674e\u8f6c\u8d26\uff0c\u5728\u4e1a\u52a1\u5c42\u7684\u6d41\u7a0b\u5e94\u8be5\u662f\u8fd9\u6837\u5b50\u7684\uff0c\u9996\u5148\u5728\u5c0f\u738b\u7684\u8d26\u4e0a\u6263\u9664\u4e00\u767e\u5143\uff0c\u4e4b\u540e\u5728\u5c0f\u674e\u7684\u8d26\u4e0a\u589e\u52a0\u4e00\u767e\u5143\u3002
\n\u8fd9\u4e2a\u8fc7\u7a0b\u9700\u8981\u6267\u884c\u81f3\u5c11\u4e24\u6761SQL\u8bed\u53e5\uff0c\u4e5f\u5c31\u662f\u8c03\u7528\u81f3\u5c11\u4e24\u6b21dao\u65b9\u6cd5\uff0c\u800c\u4e00\u65e6\u8c03\u7528\u4e2d\u95f4\u51fa\u73b0\u95ee\u9898\uff08\u4ea7\u751f\u5f02\u5e38\uff09\uff0c\u5c31\u5e94\u8be5\u7acb\u523b\u56de\u6eda\u800c\u4e0d\u662f\u8df3\u8f6c\u5230\u5f02\u5e38\u5904\u7406\u673a\u5236\u3002\u5927\u5bb6\u90fd\u5e94\u8be5\u60f3\u5230\u4f7f\u7528\u201c\u4e8b\u52a1\u5904\u7406\u201d\uff0c\u662f\u7684\uff0c\u5728\u4e00\u4e2a\u5927\u578b\u590d\u6742\u7684\u9879\u76ee\u91cc\uff0c\u4e00\u5b9a\u8981\u8fdb\u884c\u4e8b\u52a1\u5904\u7406\uff0c\u4e00\u65e6\u4e8b\u52a1\u5904\u7406\u63a7\u5236\u7684\u4e0d\u597d\uff0c\u9ebb\u70e6\u5c31\u5927\u4e86\u3002\u8fd9\u5c31\u662f\u5b83\u548c\u201c\u66b4\u9732\u7a0b\u5e8f\u4fe1\u606f\u6f0f\u6d1e\u201d\u7684\u5171\u540c\u70b9\uff0c\u53d1\u73b0\u7684\u65f6\u5019\uff0c\u8981\u51ed\u7ecf\u9a8c\u548c\u8fd0\u6c14\u3002<\/p>\n

5\uff0cXSS\u6f0f\u6d1e\u3002<\/b>
\n\u8fd9\u4e2a\u6f0f\u6d1e\u4e5f\u5f71\u54cd\u6df1\u8fdc\uff0c\u60f3\u8981\u53d1\u73b0\u8fd9\u6837\u7684\u6f0f\u6d1e\uff0c\u9664\u4e86\u5728\u9875\u9762\u4e0a\u8fdb\u884c\u6d4b\u8bd5\u5916\uff0c\u8fd8\u8981\u4ece\u6d41\u7a0b\u4e0a\u5165\u624b\u3002\u7528\u6237\u8f93\u5165\u6709\u5bb3\u4fe1\u606f\u540e\uff0c\u4fe1\u606f\u4fdd\u5b58\u5230\u6570\u636e\u5e93\uff0c\u4ece\u6570\u636e\u5e93\u4e2d\u8bfb\u51fa\u6765\u4e22\u7ed9\u7528\u6237\u65f6\u4ea7\u751f\u6f0f\u6d1e\u3002\u4e5f\u5c31\u662f\u8bf4\u6211\u4eec\u6709\u4e24\u4e2a\u8fc7\u7a0b\u53ef\u4ee5\u62e6\u622a\uff0c\u5c31\u662f\u4fdd\u5b58\u5230\u6570\u636e\u5e93\u65f6\uff0c\u548c\u4ece\u6570\u636e\u5e93\u8bfb\u51fa\u6765\u540e\u4ea4\u7ed9\u7528\u6237\u65f6\u3002\u6700\u5feb\u7684\u65b9\u6cd5\u662f\u76f4\u63a5\u6253\u5f00\u6570\u636e\u5e93\u67e5\u770b\u6570\u636e\uff0c\u5982\u679c\u6570\u636e\u6ca1\u6709\u7ecf\u8fc7\u7f16\u7801\u76f4\u63a5\u653e\u8fdb\u4e86\u6570\u636e\u5e93\uff0c\u90a3\u4e48\u53ef\u80fd\u6027\u5c31\u6709\u4e86\u4e00\u534a\u3002\u5269\u4e0b\u7684\u4e00\u534a\u66f4\u7b80\u5355\uff0c\u5728action\u5c42\u641c\u7d22\u8f6c\u7801\u5e38\u7528\u7684\u5b57\u7b26\uff0c\u5982\u679c\u6ca1\u6709\uff0c\u5c31\u5f88\u5bb9\u6613\u53d1\u73b0\u6f0f\u6d1e\u3002\u5373\u4f7f\u6709\uff0c\u4e5f\u4e0d\u7528\u7740\u6025\uff0c\u5728action\u5c42\u91cc\u6162\u6162\u627e\uff0c\u5f88\u53ef\u80fd\u8fd8\u6709\u6f0f\u7f51\u4e4b\u9c7c\u3002<\/p>\n

6\uff0c\u9875\u9762\u5c42\u7684\u903b\u8f91\u6f0f\u6d1e\u3002<\/b>
\n\u6b64\u7c7b\u6f0f\u6d1e\u6db5\u76d6\u9762\u5f88\u5927\uff0c\u5305\u62ec\u201c\u66b4\u9732\u4e0d\u8be5\u66b4\u9732\u7684\u6570\u636e\u201d\u3001\u201c\u6743\u9650\u63a7\u5236\u7684\u4e0d\u7cbe\u786e\u201d\u3001\u201c\u65b9\u4fbf\u5ba2\u6237\u7684\u540c\u65f6\u5b58\u5728\u5b89\u5168\u9690\u60a3\u201d\u7b49\u7b49\u3002\u8fd9\u7c7b\u6f0f\u6d1e\u5c31\u53ea\u80fd\u9760\u7740\u81ea\u5df1\u7684\u7ecf\u9a8c\uff0c\u4f7f\u7528\u7cfb\u7edf\u7684\u6bcf\u4e00\u4e2a\u7ec6\u5c0f\u529f\u80fd\u6765\u5bfb\u627e\u3002\u6211\u7ed9\u51fa\u51e0\u4e2a\u4f8b\u5b50\u4f9b\u5927\u5bb6\u53c2\u8003\u3002<\/p>\n

\u4f8b1\uff0c\u201c\u627e\u56de\u5bc6\u7801\u201d\u529f\u80fd\uff0c\u8fd9\u4e2a\u529f\u80fd\u662f\u4e3a\u4e86\u65b9\u4fbf\u5ba2\u6237\u7684\uff0c\u53ef\u4ee5\u901a\u8fc7\u4e00\u4e9b\u5ba2\u6237\u4e4b\u524d\u786e\u8ba4\u7684\u4fe1\u606f\u800c\u83b7\u5f97\u5ba2\u6237\u7684\u8eab\u4efd\u9a8c\u8bc1\u3002\u6709\u4e9b\u7a0b\u5e8f\u7684\u903b\u8f91\u662f\u8fd9\u6837\u7684\uff0c\u201c\u8bf7\u8f93\u5165VIP\u7528\u6237\u540d\u201d–\uff08\u5224\u65adVIP\u7528\u6237\u4e0d\u5b58\u5728\uff09–\u201c\u8bf7\u8f93\u5165\u63d0\u793a\u95ee\u9898\u7b54\u6848\u201d–\u663e\u793a\u7528\u6237\u5bc6\u7801\u6216\u63d0\u4f9b\u4fee\u6539\u5bc6\u7801\u7684\u94fe\u63a5\u3002\u7b2c\u4e00\u6b65\uff0c\u5165\u4fb5\u8005\u53ef\u4ee5\u83b7\u5f97VIP\u7528\u6237\u540d\u662f\u5426\u5b58\u5728\uff0c\u8fdb\u800c\u83b7\u53d6\u5bc6\u7801\uff0c\u7b2c\u4e8c\u6b65\uff0c\u4e00\u65e6\u7528\u6237\u7559\u7684\u95ee\u9898\u6bd4\u8f83\u5f31\u667a\uff0c\u5c31\u7b49\u4e8e\u544a\u8bc9\u522b\u4eba\u81ea\u5df1\u7684\u5bc6\u7801\u3002<\/p>\n

\u4f8b2\uff0c\u7528\u6237\u5217\u8868\u529f\u80fd\uff0c\u8bd5\u60f3\uff0c\u666e\u901a\u7528\u6237\u95f2\u7740\u6ca1\u4e8b\u770b\u7528\u6237\u5217\u8868\u505a\u4ec0\u4e48\uff1f\u8fd9\u4e2a\u529f\u5206\u660e\u662f\u4e3a\u4e86\u65b9\u4fbf\u5165\u4fb5\u8005\u641c\u96c6\u7528\u6237\u540d\u7684\u3002<\/p>\n

\u4f8b3\uff0c\u4e0d\u8981\u628a\u9632\u62a4\u4ea4\u7ed9JS\uff0c\u8c01\u544a\u8bc9\u6211\u4eec\u4f7f\u7528JS\u53ef\u4ee5\u9632\u6b62\u7528\u6237\u505a\u67d0\u4e9b\u64cd\u4f5c\u7684\uff1f\u8fd9\u7b80\u76f4\u662f\u9677\u9631\uff0cJS\u53ea\u80fd\u9632\u62a4\u666e\u901a\u7528\u6237\u800c\u5df2\uff0c\u6c38\u8fdc\u4e0d\u8981\u76f8\u4fe1\u5ba2\u6237\u7aef\u63d0\u4ea4\u4e0a\u6765\u7684\u6570\u636e\uff0c\u6211\u89c1\u5230\u6709\u4eba\u7684\u7cfb\u7edf\u5728\u9650\u5236\u4e0a\u4f20\u6587\u4ef6\u65f6\uff0c\u4ec5\u4ec5\u5728JS\u91cc\u505a\u4e86\u9632\u62a4\uff0c\u8fd9\u4e0d\u662f\u81ea\u6b3a\u6b3a\u4eba\u4e48\uff1f<\/p>\n

Web\u6f0f\u6d1e\u5c42\u51fa\u4e0d\u7a77\uff0c\u5373\u4f7f\u4e0d\u5b58\u5728\u4ee5\u4e0a\u6f0f\u6d1e\uff0c\u4e5f\u522b\u9ad8\u5174\u7684\u592a\u65e9\uff0c\u6211\u4eec\u73b0\u5728\u4f7f\u7528\u7684\u6280\u672f\uff0c\u53ea\u80fd\u9632\u8303\u76ee\u524d\u4e0a\u4e86\u53f0\u9762\u7684\u653b\u51fb\uff0c\u6216\u8bb8\u4eca\u5929\u4f60\u7684\u7cfb\u7edf\u56fa\u82e5\u91d1\u6c64\uff0c\u660e\u5929\u5c31\u51fa\u73b0\u4e86\u65b0\u7684\u653b\u51fb\u65b9\u6cd5\u3002\u5c31\u50cf04\u5e74\u7a81\u7136\u51fa\u73b0\u7684\u201c\u4e0a\u4f20\u6587\u4ef6\u201d\u6f0f\u6d1e\uff0c\u5728\u5199\u4ee3\u7801\u7684\u65f6\u5019\uff0c\u8c01\u80fd\u60f3\u5230\u8fd9\u91cc\u8fd8\u4f1a\u51fa\u73b0\u95ee\u9898\uff1f\u672c\u6587\u4e2d\uff0c\u6211\u4ec5\u4ec5\u662f\u6839\u636e\u81ea\u5df1\u7684\u4e00\u4e9b\u7ecf\u9a8c\uff0c\u4ee5\u53ca\u4e00\u65f6\u7075\u611f\u83b7\u5f97\u7684\u601d\u8def\uff0c\u7ed9\u5927\u5bb6\u629b\u7816\u5f15\u7389\u6765\u7684\uff0c\u6587\u4e2d\u4e00\u5b9a\u6709\u6ca1\u6709\u5199\u5230\u7684\u5730\u65b9\uff0c\u800c\u4ece\u5206\u5c42\u67b6\u6784\u7684\u89d2\u5ea6\u53bb\u770b\u6f0f\u6d1e\u7684\u601d\u60f3\u624d\u521a\u521a\u5f00\u59cb\uff0c\u5e0c\u671b\u6bcf\u4e00\u4f4d\u8bfb\u8005\u5728\u81ea\u5df1\u7684\u5fc3\u91cc\u90fd\u6709\u4e00\u7ffb\u5e8f\u66f2\u3002\u671f\u5f85\u5927\u5bb6\u6587\u660e\u7684\u8e22\u573a\u5b50\u548c\u9f13\u52b1\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"

\/\u6587 \u7a7a\u865a\u6d6a\u5b50\u5fc3 web\u5f00\u53d1\u5e94\u7528\u7a0b\u5e8f\uff08\u7f51\u7ad9\uff09\uff0c\u662f\u76ee\u524d\u5e94\u7528\u6700\u5e7f\u6cdb\u7684\u7a0b\u5e8f\u3002\u4f46\u662f\u5f00\u53d1\u8005 …<\/p>\n

\u7ee7\u7eed\u9605\u8bfb »<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[84,5],"tags":[],"views":4759,"_links":{"self":[{"href":"https:\/\/www.inbreak.net\/wp-json\/wp\/v2\/posts\/98"}],"collection":[{"href":"https:\/\/www.inbreak.net\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.inbreak.net\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.inbreak.net\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.inbreak.net\/wp-json\/wp\/v2\/comments?post=98"}],"version-history":[{"count":1,"href":"https:\/\/www.inbreak.net\/wp-json\/wp\/v2\/posts\/98\/revisions"}],"predecessor-version":[{"id":248,"href":"https:\/\/www.inbreak.net\/wp-json\/wp\/v2\/posts\/98\/revisions\/248"}],"wp:attachment":[{"href":"https:\/\/www.inbreak.net\/wp-json\/wp\/v2\/media?parent=98"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.inbreak.net\/wp-json\/wp\/v2\/categories?post=98"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.inbreak.net\/wp-json\/wp\/v2\/tags?post=98"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}