You can write and execute JavaScript programs on iPhone/iPod touch even if you are offline.
This is bookmarklet version.
JavaScript Shell for iPhone/iPod touch
It's posible to save your script with ver.2.
JavaScript Shell for iPhone/iPod touch (ver.2)
Sample code:
Show messagebox.
alert("Hello, world");
Calculate fibonacci.
function fib(n) {
if (n < 2) {
return n;
} else {
return fib(n - 1) + fib(n - 2);
}
}
fib(10);
Operate DOM.
document.getElementById("area").style.color = "blue";
document.getElementById("result").style.color = "red";
document.getElementById("exec").innerHTML = "Execute!!!!";
document.getElementById("save").innerHTML = "Save!!!!";
Let's enjoy programming on iPhone/iPod touch.
3 comments:
Thanks for your information
Thanks, although I type pretty slow with code on the touch lol. It's cool how it can work offline.
This is a cool hack. Why don't you write a script that allows users to save a Webpage? One that simply creates and lets u bookmark a piece of Java script that writes out the now-cached version of the page?
Post a Comment