zk client-side programming,如何使用日志

 

js代码

 

 

 

	var _linkFax = {
		count : 0,
		jQ : jq,
		widget : function(selector, context) {
			jq(selector, context).each(function(i, item) {
				zk.log(item);
			});
		}
	};

 

 

页面代

 

 

<window 	xmlns:w="http://www.zkoss.org/2005/zk/client" >
<listbox id="recipientsListbox" fixedLayout="true"
						multiple="true" checkmark="true" height="200px">
						<auxhead>
							<auxheader colspan="4">
								<label value="收件人列表" style="float:left;padding-top:2px;"></label>
								<n:span style="float:right;">
									<toolbarbutton image="/images/pencil_add.png"
										tooltiptext="手动添加" w:onClick="linkFax.widget('@listitem')"></toolbarbutton>
									&#160;
									<toolbarbutton tooltiptext="移除选中行"
										image="/images/red_delete.gif"></toolbarbutton>
								</n:span>
							</auxheader>
						</auxhead>
						<listhead>
							<listheader label="客户姓名"></listheader>
							<listheader label="传真号码"></listheader>
							<listheader label="部门"></listheader>
							<listheader label="公司"></listheader>
						</listhead>
</listbox>
</window>

 

调用: w:onClick="linkFax.widget('@listitem')"

 

效果: