Posts

Showing posts with the label code cheatsheet

jQuery table

 <!DOCTYPE html>  <html>  <head>  <meta content="initial-scale=1,  maximum-scale=1, user-scalable=0"  name="viewport" />  <meta name="viewport" content="width=device-width" />  <!--Datatable plugin CSS file --> <link rel="stylesheet" href=  "https://cdn.datatables.net/1.10.22/css/jquery.dataTables.min.css" />  <!--jQuery library file --> <script type="text/javascript" src="https://code.jquery.com/jquery-3.5.1.js">  </script>  <!--Datatable plugin JS library file --> <script type="text/javascript" src="https://cdn.datatables.net/1.10.22/js/jquery.dataTables.min.js">  </script>  </head>  <body>  <h2>  Multiple tables operations  using jQuery Datatables  </h2>  <!--HTML tables with student data--> <table id="" class="disp...

image preview after upload

HTML CODING PART   <!DOCTYPE html> <html lang="en"> <head>     <meta charset="UTF-8">     <meta name="viewport" content="width=device-width, initial-scale=1.0">     <title>Document</title>     <link rel="stylesheet" href="style.css">     </head> <body>     <!--  source link: https://levelup.gitconnected.com/preview-an-image-before-uploading-using-javascript-953557f54154 -->     <h1>Preview an Image Before Uploading Using JavaScript</h1> <div class="image-preview-container">     <div class="preview">         <img id="preview-selected-image" />     </div>     <label for="file-upload">Upload Image</label>     <input type="file" id="file-upload" accept="image/*" onchange="previewImage(event);" /> </div> </body> <script ...