forked from blueimp/JavaScript-MD5
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
95 lines (95 loc) · 3.61 KB
/
index.html
File metadata and controls
95 lines (95 loc) · 3.61 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
<!DOCTYPE HTML>
<!--
/*
* JavaScript MD5 Demo 1.0
* https://github.com/blueimp/JavaScript-MD5
*
* Copyright 2011, Sebastian Tschan
* https://blueimp.net
*
* Licensed under the MIT license:
* http://www.opensource.org/licenses/MIT
*/
-->
<html lang="en">
<head>
<meta charset="utf-8">
<title>JavaScript MD5 Demo</title>
<meta name="description" content="JavaScript MD5 implementation.">
<meta name="viewport" content="width=device-width">
<link rel="stylesheet" href="http://blueimp.github.com/cdn/css/bootstrap.min.css">
<style>body{padding-top:60px;}</style>
<link rel="stylesheet" href="http://blueimp.github.com/cdn/css/bootstrap-responsive.min.css">
<!--[if lt IE 7]><link rel="stylesheet" href="http://blueimp.github.com/cdn/css/bootstrap-ie6.min.css"><![endif]-->
<!--[if lt IE 9]><script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script><![endif]-->
</head>
<body>
<div class="navbar navbar-fixed-top">
<div class="navbar-inner">
<div class="container">
<a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</a>
<a class="brand" href="https://github.com/blueimp/JavaScript-MD5">JavaScript MD5</a>
<div class="nav-collapse">
<ul class="nav">
<li class="active"><a href="#">Demo</a></li>
<li><a href="https://github.com/blueimp/JavaScript-MD5/downloads">Downloads</a></li>
<li><a href="https://github.com/blueimp/JavaScript-MD5">Source Code</a></li>
<li><a href="https://github.com/blueimp/JavaScript-MD5">Documentation</a></li>
<li><a href="https://github.com/blueimp/JavaScript-MD5/issues">Issues</a></li>
<li><a href="test/">Test</a></li>
<li><a href="https://blueimp.net">© Sebastian Tschan</a></li>
</ul>
</div>
</div>
</div>
</div>
<div class="container">
<div class="page-header">
<h1>JavaScript MD5 Demo</h1>
</div>
<blockquote>
<p>JavaScript <a href="http://en.wikipedia.org/wiki/MD5">MD5</a> implementation.<br>
Compatible with server-side environments like <a href="http://nodejs.org/">node.js</a>, module loaders like <a href="http://requirejs.org/">RequireJS</a> and all web browsers.</p>
</blockquote>
<br>
<div class="row">
<div class="span7">
<h2>Input</h2>
<textarea class="span7" rows="6" id="input"></textarea>
</div>
<div class="span5">
<h2>Result</h2>
<div class="well" id="result"></div>
<p>
<button class="btn btn-primary" id="calculate">Calculate</button>
<button class="btn" type="reset" id="reset">Reset</button>
</p>
</div>
</div>
</div>
<script src="md5.min.js"></script>
<!-- jQuery and Bootstrap JS are not required, but included for the demo -->
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
<script src="http://blueimp.github.com/cdn/js/bootstrap.min.js"></script>
<script>
/*global jQuery, window */
(function ($) {
'use strict';
var calculate = function () {
$('#result').html(window.md5($('#input').val()));
},
init = function () {
$('#input').val('日本');
$('#result').empty();
};
init();
$('#calculate').on('click', calculate);
$('#reset').on('click', init);
}(jQuery));
</script>
</body>
</html>