JSFiddle - React, Tailwind, and code Playground

by Santharam N R

HTML

<html>

<head>

<script type="text/javascript" src="js/jquery-1.7.1.js"></script>

<script type="text/javascript">

$(function() {

$("document").ready(function(){

        $("#myFile1").change(function() {

var f1=document.getElementById("myFile1").value;

        if((f.size||f.fileSize)==09765625)

        {

        alert("file size is less than 1mb");

        }

        else

        {

        alert("file size should not exceed more than 1mb");

                $(this).val($.data(this, 'f'));

        return false;

        }

            });
});

})

</script>

</head>

<body>

<input type='file' name="file" id="myFile1" />

</body>

</html>