当前位置: 代码迷 >> JavaScript >> ExtJS_4.1_自学札记_Event
  详细解决方案

ExtJS_4.1_自学札记_Event

热度:99   发布时间:2012-08-07 14:54:49.0
ExtJS_4.1_自学笔记_Event
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>ext_2.1_Event</title>
<link rel="stylesheet" type="text/css"
	href="extjs/resources/css/ext-all.css" />
<script type="text/javascript" src="extjs/ext-all.js"></script>
<script type="text/javascript">
	Ext.onReady(function() {

		var e = Ext.get("hello");

		e.on("keypress", function(e) {
			if (e.charCode == Ext.EventObject.SPACE)
				Ext.MessageBox.alert("hello", "空格");
		});
	});
</script>
</head>
<body>

	<input type="text" id="hello" />

</body>
</html>
  相关解决方案