转载自:http://lucky16.iteye.com/blog/1490278
一、效果图
先用美图勾引那些驻足观望之人:
二、代码讲解
注意代码中的EXT js引入路径, 需要根据你的实际情况进行引入,否者可能出现错误
-
<html>
-
<head>
-
<title>系统登录</title>
-
<metacharset="UTF-8"/>
-
<linkrel="stylesheet"type="text/css"href="extjs/resources/css/ext-all.css"/>
-
<style>
-
</style>
-
<scripttype="text/javascript"src="extjs/ext-base.js"></script>
-
<scripttype="text/javascript"src="extjs/ext-all.js"></script>
-
<scripttype="text/javascript"src="extjs/ext-lang-zh_CN.js"></script>
-
</head>
-
<body>
-
<formid="form1"runat="server">
-
<scripttype="text/javascript">
-
Ext.onReady(function(){
-
-
Ext.QuickTips.init();
-
Ext.form.Field.prototype.msgTarget='side';
-
-
varform1=newExt.FormPanel({
-
layout:'form',
-
collapsible:true,
-
autoHeight:true,
-
frame:true,
-
renderTo:Ext.getBody(),
-
title:'<centerstyle="curor:hand"onclick="window.location.reload();">表单控件</center>',
-
style:'margin-left:auto;margin-right:auto;width:500px;margin-top:8px;',
-
-
labelAlign:'right',
-
-
labelWidth:170,
-
-
buttonAlign:'center',
-
-
defaults:{
-
width:180
-
},
-
items:[{
-
fieldLabel:'文本框控件',
-
name:'TextBox',
-
xtype:'textfield'
-
-
-
},{
-
fieldLabel:'只允许输入数字',
-
name:'TextBoxNumber',
-
xtype:'numberfield'
-
-
-
-
-
},{
-
fieldLabel:'下拉框控件',
-
name:'DropDownList',
-
xtype:'combo',
-
-
displayField:"Name",
-
-
valueField:"Id",
-
-
editable:false,
-
typeAhead:true,
-
-
-
-
triggerAction:'all',
-
-
-
store:newExt.data.SimpleStore({
-
fields:['Id','Name'],
-
data:[[1,'男'],[0,'女']]
-
})
-
},{
-
fieldLabel:'日历控件',
-
xtype:'datefield',
-
name:'DateControl',
-
format:"Y-m-d",
-
editable:false
-
-
-
},{
-
fieldLabel:'单选控件',
-
xtype:'radiogroup',
-
name:'Radios',
-
items:[{
-
name:'RadioItems',
-
boxLabel:'选我',
-
inputValue:'1',
-
checked:true
-
},{
-
name:'RadioItems',
-
boxLabel:'选我吧',
-
inputValue:'0'
-
}]
-
},{
-
fieldLabel:'复选控件',
-
xtype:'checkboxgroup',
-
name:'Checkboxs'
-
-
,
-
columns:2,
-
items:[{
-
name:'CheckboxItems',
-
boxLabel:'香蕉',
-
inputValue:'A'
-
},{
-
name:'CheckboxItems',
-
boxLabel:'苹果',
-
inputValue:'B'
-
},{
-
name:'CheckboxItems',
-
boxLabel:'橘子',
-
inputValue:'C'
-
},{
-
name:'CheckboxItems',
-
boxLabel:'桃子',
-
inputValue:'D'
-
}]
-
},{
-
fieldLabel:'文本域控件',
-
xtype:'textarea',
-
value:'可以输好多字!',
-
height:50
-
},{
-
fieldLabel:'时间控件',
-
xtype:'timefield'
-
-
-
,
-
format:'H:i'
-
-
,
-
increment:60
-
},{
-
fieldLabel:'标签页',
-
xtype:'fieldset',
-
title:'标签页',
-
autoHeight:true,
-
items:[{
-
xtype:'panel',
-
title:'标签页中的面板',
-
frame:true,
-
height:50
-
}]
-
},{
-
fieldLabel:'在线编辑器',
-
xtype:'htmleditor',
-
width:260,
-
height:100
-
-
-
-
-
-
-
-
-
-
}],
-
buttons:[{
-
text:"保存",
-
handler:function(){
-
MsgInfo('保存');
-
}
-
},{
-
text:"取消",
-
handler:function(){
-
form1.form.reset();
-
}
-
}]
-
});
-
-
functionMsgInfo(str_msg){
-
Ext.MessageBox.show({
-
title:'提示',
-
msg:str_msg,
-
width:400,
-
icon:Ext.MessageBox.INFO,
-
buttons:Ext.MessageBox.OK
-
});
-
}
-
-
});
-
-
</script>
-
</form>
-
</body>
-
</html>
分享到:
相关推荐
NULL 博文链接:https://lucky16.iteye.com/blog/1522254
语言程序设计资料:ExtJs学习笔记-2积分.doc
extjs2----关于extjs 的使用,操作.比较初级,但是也比较使用。适合初步接触extjs的朋友
深入浅出EXTJS241-320深入浅出EXTJS241-320深入浅出EXTJS241-320深入浅出EXTJS241-320深入浅出EXTJS241-320深入浅出EXTJS241-320深入浅出EXTJS241-320深入浅出EXTJS241-320深入浅出EXTJS241-320深入浅出EXTJS241-320...
ExtJS----HelloWorld程序源码
extjs-basex.js extjs-basex.js extjs-basex.js
extjs--创建图表 折线图、饼状图、柱状图
EXTJS---完整数据库代码,全网唯一,非常适合EXTJS搭建框架,包含动态树,菜单,集成SPIRNGMVC+exjs+jdbc 等
extjs_4.1.0_community_extjs4-mvc-complex-dashboard
Extjs4---combobox省市区三级联动+struts2
Extjs4---grid的修改、删除功能---结合struts2、hibernate
一个extjs的OA项目 extjs-OA extjs-oaextjs-OA extjs-oa
深入浅出EXTJS241-320深入浅出EXTJS241-320深入浅出EXTJS241-320深入浅出EXTJS241-320
Extjs4--Form登录功能,结合struts2
extjs-620-docs官方文档extjs-620-docs官方文档extjs-620-docs官方文档
extJs-5.0.1-gpl附带sencha cmd安装程序、ruby编译包(分为32位和64位)和教程,一共四部分
extjs4.2-2
ExtJS4.0-API Ext4.0-API Ext4 ExtJS4 API 学EXTJS4的好东西...