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,048 |
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 |
Flex box | 2,171 Kb |
Star Rates with radio buttons and CSS | 2,650 Kb |
CSS Sub-orderd list | 1,965 Kb |
Get Form value with jQuery | 1,931 Kb |
Check box in Bootstrap Drop down list | 2,170 Kb |
Parallax with only css | 3,096 Kb |
Timeline sample | 2,263 Kb |
Timeline with CSS | 2,552 Kb |
Materialize css | 3,074 Kb |
AngularJS | 2,264 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 |
Process Accordion | Devilskitchen | 31,432 Kb |
LBCA - Mail canvas | Emnbdx | 3,856 Kb |
Comment Jquery | SquishyAndroid | 2,421 Kb |
How to add Css Fold Notes In Blogger By Askwithloud.com | Askwithloud | 2,280 Kb |
CSS Variables | Jdsteinbach | 4,759 Kb |
A Pen by Jay | Jaycode | 3,784 Kb |
A Pen by boilzzz | Boilzzz | 2,761 Kb |
Css3 loader | Clknap | 2,391 Kb |
Fluid Layout with Float | Jxqr97 | 1,785 Kb |
CSS Tooltips | Darylldoyle | 2,599 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!