Welcome aboard! We are happy you are here and wish you good net-raft!
<!DOCTYPE html>
<html lang="en">
<head>
<script src="https://code.jquery.com/jquery-2.1.3.min.js" type="text/javascript"></script>
</head>
<body>
<script>
// works in chrome, opera, safari
$(document).ready(function () {
var id = $("#id").text();
var country = $("#country").text();
var city = $("#city").text();
var db=null;
db = window.openDatabase("MyDb", "1.0", "my database", 1024*1024*3);
db.transaction(function(tx){
tx.executeSql(
"UPDATE MYTABLE set city = ? where id = ?", [city,id],
function(){$("#output").text("record has been sucessfully updated!");},
function(tx, error){$("#output").text(error.message);}
);
});
});
</script>
<div id="id">1</div></br>
<div id="city">Portland</div></br>
<div id="output"></div>
</body>
</html>
The most helpful JQUERY solutions
plugin get client ip address using jqueryJQUERY Click to see more ... 10.4K 1.8K