有時候咱們想在js裏面使用加密,jQuery就提供了這樣的插件,用法十分簡單:javascript
$(md("你想要加密的字符串"));html
md5插件下載地址:http://plugins.jquery.com/project/md5java
下面是個人簡單例子jquery
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
- <html xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <title></title>
- <script type="text/javascript" src="Scripts/jquery-1.3.2.min.js"></script>
- <script type="text/javascript" src="Scripts/jquery.md5.js"></script>
- <script type="text/javascript">
- alert($.md5("Hello"));
- </script>
- </head>
- <body>
- </body>
- </html>