测试一下你的javascript能力 14题,看你能对多少题目
1.
(function(){
return typeof arguments;
})();
“object”
“array”
“arguments”
“undefined”
2.
var f = function g(){ return 23; };
typeof g();
“number”
“undefined”
“function”
Error
3.
(function(x){
delete x; return x;
})(1);
1
null
undefined
Error
4.
var y = 1, x = y = typeof x;
x;
1
“number”
undefined
“undefined”
5.
(function f(f){
return typeof f();
})(function(){ return 1; });
“number”
“undefined”
“function”
Error
6.
var foo = {
bar: function() { return this.baz; },
baz: 1
};
(function(){
return typeof arguments[0]();
})(foo.bar);
“undefined”
“object”
“number”
“function”
7.
var foo = {
bar: function(){ return this.baz; },
&
相关文档:
没有按别人的推荐,学什么圣经类的js书,而是随便挑了本《JavaScript in 10 Steps or Less》。
花了3个小时,看了30个task。
讲的非常浅显详细。虽然是E文,但很浅显易懂。
task31:
Calling Functions from Tags
One of the benefits of JavaScript is to be able to tie interactivity to elements of the HTML page. ......
1. SproutCore
SproutCore 苹果对SproutCore的解释为“开源,平台无关,类Cocoa的JavaScript框架,用于创建具有桌面应用程序外观和操作感的Web应用程序。”
SproutCore demonstrations: Photos, Sample Controls
2. Spry
Spry 是Adobe 的 Ajax framework. Spry的目的是成为实现Ajax的一种简单方式,对HTML、C ......
click()对象.click()使对象被点击。
closed对象.closed对象窗口是否已关闭true/false
clearTimeout(对象)清除已设置的setTimeout对象
clearInterval(对象)清除已设置的setInterval对象
confirm("提示信息")弹出确认框,确定返回true取消返回false
cursor:样式更改鼠标样式handcrosshairtextwaithelpdefaultautoe/s/w/n ......
/// <summary>
/// 判断是否为正小数
/// </summary>
/// <param name="str"></param>
/// <returns>为正小数时返回true,其他返回false</returns>
public static bool IsDecimal(string str)
{
//声明Regex对象变量
Regex objAlp ......