JSFiddle - React, Tailwind, and code Playground
by jquerybyexample
HTML
<script src="http://www.itsyndicate.ca/gssi/jquery/jquery.crypt.js"></script>
<p><u>Using jQuery Crypt Plugin</u></p><br/>
Enter Value : <input type="text" id="txtValue" />
<br/><br/>
<input type="button" id="btnConvert" value=" Convert to MD5 "/>
<br/><br/>
<div id="dvValue"></div>
CSS
body
{
padding: 10px;
font-family: Calibri;
font-size: 12pt;
}
input
{
font-family: Calibri;
font-size: 12pt;
}
div
{
color:Green;
}
p
{
font-family: Calibri;
font-size: 20pt;
color:Maroon;
}
JavaScript
$(document).ready(function() {
$('#btnConvert').click(function(e) {
var strVal = $('#txtValue').val();
if (strVal.length == 0) {
$('#dvValue').html('Please enter something');
}
else {
var strMD5 = $().crypt({
method: "md5",
source: strVal
});
$('#dvValue').html("MD5 string of <b>" + strVal + "</b> is <b>" + strMD5 + "</b>");
}
e.preventDefault();
});
});