`
garyli
  • 浏览: 172962 次
  • 性别: Icon_minigender_1
  • 来自: 北京
社区版块
存档分类
最新评论
收藏列表
标题 标签 来源
js中apply 方法 替换执行上下文 js apply
	obj = {
		attr:"some attr",
		say:function(){
			alert("my attr is "+this.attr);
		}
	}

	obj.say.apply({attr:"another attr"});
jquery 选择相同id的checkbox jquery 相同id
选择id为“ids”的所有checkbox

var ids = $(':checkbox[id=ids]');
scala 类定义 和 无参数函数调用 scala 类 无参数函数
class Complex(real: Double,imaginary: Double){
	//无返回值的函数,可以不写()
	def re = real
	def im = imaginary
}

object ComplexNumbers{
	def main(args:Array[String]){
		val c = new Complex(1.2,3.4)
		//调用时也可以不写()
		println("imaginary part:"+ c.im)
	}
}
hello scala scala
object HelloWorld{

	def main(args: Array[String]){
		println("Hello,wrold! scala")
	}
}
Global site tag (gtag.js) - Google Analytics