HTML and CSS Reference
In-Depth Information
body { font-family: helvetica, arial;}
<legend>Select a time range of recent HTML5 tweets</
¬ legend>
<input type=”radio” value=”5” id=”t5m” name=”timerange”
¬ /><label for=”t5m”>5 minutes</label>
<input type=”radio” value=”30” id=”t30m” name=
¬ ”timerange” /><label for=”t30m”>30 minutes</label>
<input type=”radio” value=”120” id=”t2h” name=
¬ ”timerange” /><label for=”t2h”>2 hours</label>
<input type=”radio” value=”all” id=”tall” name=
¬ ”timerange” checked=”checked” /><label for=”tall”>
¬ all time</label>
<ul id=”tweets”></ul>
var tweetEl = document.getElementById('tweets');
var db;
function setupDatabase() {
if (!window.openDatabase) {
tweetEl.innerHTML = '<li>Web SQL Database API is not
¬ available in this browser, please try nightly Opera,
¬ Webkit or Chrome.</li>';
db = openDatabase('tweets', '1.0', 'db of tweets',
¬ 2 * 1024 * 1024);
db.transaction(function (tx) {
tx.executeSql('CREATE TABLE tweets (id unique,
¬ screen_name, date integer, text)');
function getTweets() {
var script = document.createElement('script');
Search WWH ::

Custom Search