Web SQL
How do I make an web sql?
What is a web sql? How do you make a web sql? This script and codes were developed by Tommy on 30 December 2022, Friday.
Web SQL - Script Codes HTML Codes
<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Web SQL</title> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/normalize/5.0.0/normalize.min.css"> <script src="https://cdnjs.cloudflare.com/ajax/libs/prefixfree/1.0.7/prefixfree.min.js"></script>
</head>
<body> <div> <button id="create">Create Table</button> <button id="insert">Insert Data</button> <button id="load">Load Data</button> </div> <script src='http://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js'></script> <script src="js/index.js"></script>
</body>
</html>
Web SQL - Script Codes JS Codes
$(function(){ var dbName = 'Test1'; var version = '1.0'; var displayName = 'Test1'; var estimatedSize = 65536; function createTableIfNotExists(){ var db = openDB(); db.transaction( function(trans){ trans.executeSql( 'CREATE TABLE IF NOT EXISTS list ' + '( id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, ' + ' name TEXT NOT NULL,' + ' email TEXT NOT NULL);' ); } ); } function insertData(){ var db = openDB(); db.transaction( function(trans){ trans.executeSql( 'INSERT INTO list (name, email) ' + 'VALUES ("foo","[email protected]");' ); } ); } function getData(){ var db = openDB(); db.transaction( function(trans){ trans.executeSql( 'SELECT * FROM list;', [], function(trans, r){ for(var i=0; i<r.rows.length; i++){ alert( 'id=' + r.rows.item(i).id + ' name: ' + r.rows.item(i).name + ' email: ' + r.rows.item(i).email ); } } ); } ); } function openDB(){ return openDatabase( dbName, version, displayName, estimatedSize); } $('#create').click(function(){ createTableIfNotExists(); }); $('#insert').click(function(){ insertData(); }); $('#load').click(function(){ getData(); }); });

Developer | Tommy |
Username | hoehoe |
Uploaded | December 30, 2022 |
Rating | 3 |
Size | 1,983 Kb |
Views | 4,046 |
Find the perfect freelance services for your business! Fiverr's mission is to change how the world works together. Fiverr connects businesses with freelancers offering digital services in 500+ categories. Find Developer!
Name | Size |
CSS animation | 2,194 Kb |
Timeline with CSS | 2,552 Kb |
Adding FontAwsome icon via CSS pseudo vs fa class | 2,614 Kb |
Materialize css | 3,074 Kb |
Flex box | 2,171 Kb |
Customise Scroll Bar with css | 2,853 Kb |
Star Rates with radio buttons and CSS | 2,650 Kb |
Parallax with only css | 3,096 Kb |
Timeline sample | 2,263 Kb |
Get Form value with jQuery | 1,931 Kb |
Jasper is the AI Content Generator that helps you and your team break through creative blocks to create amazing, original content 10X faster. Discover all the ways the Jasper AI Content Platform can help streamline your creative workflows. Start For Free!
Name | Username | Size |
CSS3 Media Queries demo | Machal | 1,824 Kb |
NT Tribute | Skybutterfly | 2,850 Kb |
Animated rainbow wave on canvas | Icodeforlove | 2,777 Kb |
IE11 Test | Boostnewmedia | 4,998 Kb |
Hexagons | Ashmind | 4,360 Kb |
FCC - Tribute Page | Cmwebby | 0 Kb |
BSP Dungeon Generation | Xgundam05 | 5,326 Kb |
CSS Org Chart | Appirio-ux | 3,882 Kb |
Rotate Demo | Agelber | 3,061 Kb |
Sticky div | Kaslab | 2,225 Kb |
Surf anonymously, prevent hackers from acquiring your IP address, send anonymous email, and encrypt your Internet connection. High speed, ultra secure, and easy to use. Instant setup. Hide Your IP Now!