JSFiddle - React, Tailwind, and code Playground
by jquerybyexample
HTML
<script src="https://raw.github.com/gabrieleromanato/jQuery-MD5/master/jquery.md5.min.js"></script>
<p><u>Using jQuery MD5 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:blue;
}
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 = $.md5(strVal);
$('#dvValue').html("MD5 string of <b>" + strVal + "</b> is <b>" + strMD5 + "</b>");
}
e.preventDefault();
});
});