Question
How to use Javascript Tools? does it has one for each branch?
I use jt cs5 and test a file like pic show, when run, it told document is not define.
what's wrong with it? function is as follow,
function f2c(s) {
var test = /(\d+(\.\d*)?)F\b/g; // 初始
return(s.replace
(test,
function($0,$1,$2) {
return((($1-32) * 5/9) + "C");
}
)
);
}
document.write(f2c("Water freezes at 32F and boils at 212F."));