摘要: 三元运算符:第一个是条件表达式,其余的是两个值,条件表达式成立时运算取第一个值,不成立时取第二个值。 示例代码:boolean b=20<45?true:false; 三元运算符用于判断,等价于if ...else语句如下: boolean a;//生命boolean变量 if(20<45)//判断 阅读全文
posted @ 2016-09-12 11:12 丶疏影横斜 阅读(523) 评论(0) 推荐(0) 编辑
摘要: 整数类型: byte:8位(1个字节) eg:byte x=2,y; 错误实例:byte b;b=b+3; 其中b=b+3是错误的,应该是b=(byte)(b+3)强制转换; short:16位(2个字节) short x=2; int:32位(4个字节) 默认类型,int x=2; long:64 阅读全文
posted @ 2016-09-12 08:53 丶疏影横斜 阅读(269) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2016-09-10 21:07 丶疏影横斜 阅读(170) 评论(0) 推荐(0) 编辑
摘要: 字符(Character)是各种文字和符号的总称,包括各国家文字、标点符号、图形符号、数字等。字符集(Character set)是多个字符的集合,字符集种类较多,每个字符集包含的字符个数不同,常见字符集名称:ASCII字符集、GB2312字符集、BIG5字符集、 GB18030字符集、Unicod 阅读全文
posted @ 2016-09-10 11:15 丶疏影横斜 阅读(275) 评论(0) 推荐(0) 编辑
摘要: public class hello { public static void main(String[] args) { // TODO 自动生成的方法存根 System.out.println(" ★ ★ ★ ★"); System.out.println(" ★ ★ ★ ★"); System 阅读全文
posted @ 2016-09-09 20:10 丶疏影横斜 阅读(580) 评论(0) 推荐(0) 编辑
摘要: class Hello{ public static void main(String [] args) { System.out.println(" Hello 这是我的第一个java作品"); System.out.println(" * * * * * * * "); System.out.p 阅读全文
posted @ 2016-09-09 11:07 丶疏影横斜 阅读(102) 评论(0) 推荐(0) 编辑
摘要: 1、表单验证 (1)非空验证(去空格) (2)对比验证(跟一个值对比) (3)范围验证(根据一个范围进行判断) (4)固定格式验证:电话号码,身份证号,邮箱,信用卡号等的验证;选要用到正则表达式进行验证。 (5)其他验证 2、正则表达式 用符号来描述书写规则:/ 中间写正则表达式 / ^ 匹配开头 阅读全文
posted @ 2016-09-07 16:06 丶疏影横斜 阅读(237) 评论(0) 推荐(0) 编辑
摘要: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.or 阅读全文
posted @ 2016-09-07 15:19 丶疏影横斜 阅读(231) 评论(0) 推荐(0) 编辑
摘要: 位于<head></head>之间 1.设置页面关键字: <meta name="keywords" content="输入具体关键字"/> 2.设置页面说明: <meta name="description" content="设置页面说明"/> 3.定义编辑工具 <meta name="gene 阅读全文
posted @ 2016-09-06 09:20 丶疏影横斜 阅读(590) 评论(0) 推荐(0) 编辑
摘要: 1.颜色属性:color属性定义文本的颜色 方式:1)color:green 2)color:#ff6600 3)简写式 color:#f60 4)RGB color:rgb(225,225,225) 5)RGBA color:rgba(225,225,225,0) 外加一个alpha通道,表示透明 阅读全文
posted @ 2016-09-05 16:55 丶疏影横斜 阅读(243) 评论(0) 推荐(0) 编辑