Codice HTML:
var db = openDatabase('dbp', '1.0', 'pokemon', 2 * 1024 * 1024);
var msg;
db.transaction(function (tx) {
tx.executeSql('DROP TABLE pokemon');
tx.executeSql('CREATE TABLE IF NOT EXISTS pokemon (num INT unique,numn INT,nome TEXT,t1 TEXT,t2 TEXT,evhp INT,evatk INT,evdef INT,evatksp INT,evdefsp INT,evspeed INT,hp INT,atk INT,def INT,atksp INT,defsp INT,speed INT,evolvein TEXT,lv TEXT,resistentea TEXT,debolea TEXT,incolumea TEXT)');
tx.executeSql("INSERT INTO pokemon VALUES ( 1, 1,\"Bulbasaur\", \"grass\", \"poison \", 0, 0, 0, 1, 0, 0, 45, 49, 49, 65, 65, 45, Ivysaur, \"16\", \"<img src='t/flying.png'/>, <img src='t/fire.png'/>, <img src='t/psychic.png'/>, <img src='t/ice.png'/>\", \"<img src='t/fighting.png'/>, <img src='t/water.png'/>, <img src='t/electric.png'/>, <img src='t/grass.png'/>\", \"\"");
tx.executeSql("INSERT INTO pokemon VALUES ( 2, 2,\"Ivysaur\", \"grass\", \"poison \", 0, 0, 0, 1, 1, 0, 60, 62, 63, 80, 80, 60, Venusaur, \"32\", \"<img src='t/flying.png'/>, <img src='t/fire.png'/>, <img src='t/psychic.png'/>, <img src='t/ice.png'/>\", \"<img src='t/fighting.png'/>, <img src='t/water.png'/>, <img src='t/electric.png'/>, <img src='t/grass.png'/>\", \"\"");
tx.executeSql("INSERT INTO pokemon VALUES ( 3, 3,\"Venusaur\", \"grass\", \"poison \", 0, 0, 0, 2, 1, 0, 80, 82, 83, 100, 100, 80, , \"0\", \"<img src='t/flying.png'/>, <img src='t/fire.png'/>, <img src='t/psychic.png'/>, <img src='t/ice.png'/>\", \"<img src='t/fighting.png'/>, <img src='t/water.png'/>, <img src='t/electric.png'/>, <img src='t/grass.png'/>\", \"\"");
Ovviamente son solo 3 ma ne ho 649 da inserire nel database (li ho già tutti pronti ma di certo non posto 649 elementi, non avrebbe alcun senso).