⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 event.zul

📁 ZK是一个Ajax Java Web框架
💻 ZUL
字号:
<?xml version="1.0" encoding="UTF-8"?><!--event.zul{{IS_NOTE	Purpose:			Description:			History:		Tue Nov 18 15:40:23     2008, Created by jumperchen}}IS_NOTECopyright (C) 2008 Potix Corporation. All Rights Reserved.{{IS_RIGHT}}IS_RIGHT--><window id="demo" apply="org.zkoss.zkdemo.userguide.DemoWindowComposer">	<html><![CDATA[
		<h4>Event listener</h4>
		<p>Change focus to a component is easy, just call the focus() method.</p>	]]></html>	<separator/>	<tabbox width="100%" tabscroll="false">		<tabs>			<tab id="demoView" label="Demo"/>			<tab id="srcView" label="View Source"/>		</tabs>		<tabpanels>			<tabpanel>				<window id="view">				</window>			</tabpanel>						<tabpanel>				<panel>					<panelchildren>						<textbox id="codeView" class="code" rows="20" width="95%">			<attribute name="value"><![CDATA[
<zk>
	<style dynamic="true">
		.z-label.focus {
			color: #90BCE6; 
		}
	</style>
	<zscript>
		void changeStyle(Label text) {
			if ("focus".equals(text.sclass)) {
				text.sclass = "";
			} else {
				text.sclass = "focus";
			}
		}
	</zscript>
	<vbox>
		<hbox><label id="t1" value="text1:"/> 
			<textbox id="text1">
				<attribute name="onFocus">
					changeStyle(t1);
				</attribute>
				<attribute name="onBlur">
					changeStyle(t1);
				</attribute>
			</textbox>
		</hbox>
		<hbox><label id="t2" value="text2:"/> <textbox id="text2" onBlur="changeStyle(t2)" onFocus="changeStyle(t2)"/></hbox>
		<hbox>
			<button label="change focus to text1" onClick="text1.focus();"/>
			<button label="change focus to text2">
				<attribute name="onClick">
					text2.focus();
				</attribute>
			</button>
		</hbox>
	</vbox>
</zk>			]]></attribute>						</textbox>					</panelchildren>					<toolbar mold="panel">
						<button id="tryBtn" label="Try me!"/>						<button id="reloadBtn" label="Reload" height="18px"/>					</toolbar>				</panel>			</tabpanel>		</tabpanels>	</tabbox></window>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -