1. 程式人生 > >js三種繫結單擊事件

js三種繫結單擊事件

    $("#text").bind("click",function(){
		alert("我的id為text,你點選時觸發");
	});
	
	$("#text1").on("click",function(){
		alert("hellworl");
	});
	
	$("#text2").click(function(){
		alert($("#text2").val());
	});