摘要: 我是A! A!!! 我是B!!! 阅读全文
posted @ 2013-06-23 12:02 Nano 阅读(3825) 评论(0) 推荐(0) 编辑
摘要: ImageView及其子类ImageView 派生出ImageButton , ZoomButton继承于View组件,主要功能用于显示图片。xml属性 相关方法 说明adjustViewBounds setAdjustViewBounds() 是否调整自己的边界来保持所显示图片的长宽比cropToPadding setCropToPadding() 设置为true 将会被裁剪到保留图片的paddingmaxHeight setMaxHeigh... 阅读全文
posted @ 2013-06-14 15:51 Nano 阅读(213) 评论(0) 推荐(0) 编辑
摘要: UI组件:TextView及其子类文本框TextView 编辑框EditTextTextView继承了View 它是EditText 和 Button的父类。单选按钮 RadioButton复选框 CheckButton状态开关 ToggleButton开关 Switch时钟 AnalogClock数字时钟 DigitalClock计时器 Chronometer 阅读全文
posted @ 2013-06-14 15:15 Nano 阅读(110) 评论(0) 推荐(0) 编辑
摘要: 布局管理器:1.线布局:<LinearLayout></LinearLayout> 类似html的ul li2.表格布局:<TableLayout><TableRow></TableRow></TableLayout> 添加行3.帧布局:<FrameLayout></FrameLayout> 当前容器下叠加一起4.相对布局:<RelativeLayout></RelativeLayout>当前容器下必须指定位置5.网格布局:<GridLayout></Gri 阅读全文
posted @ 2013-06-13 15:21 Nano 阅读(222) 评论(0) 推荐(0) 编辑
摘要: 普通字符串 编码解码:var b = new Buffer('JavaScript');var s = b.toString('base64');// SmF2YVNjcmlwdA==var b = new Buffer('SmF2YVNjcmlwdA==', 'base64')var s = b.toString();// JavaScript编码解码并转成hexvar b = new Buffer('SmF2YVNjcmlwdA==', 'base64')var s = b.toString(& 阅读全文
posted @ 2013-05-27 12:40 Nano 阅读(56618) 评论(0) 推荐(0) 编辑
摘要: 今天犯了一个比较低级的错误,导致报了这个错误..Ex://errorvar obj = { a : 1, b : 2, c : 3,}//correctvar obj = { a : 1, b : 2, c : 3 }如果这样结尾处加了逗号FF下不会报错,ie下就会报缺少标识 字符串 或数字这个错误了.这个还比较好找..//error$('<img>' , { src : 'img.gif', class : 'images', id : 'images'});//correct$('<img>&# 阅读全文
posted @ 2012-08-28 18:39 Nano 阅读(932) 评论(0) 推荐(0) 编辑
摘要: function linkUrl(str){ var reg = /((http\:\/\/)?(\w+\.)+(\w{2,3}))\b/g; return str.replace(reg , '<a target=_blank href="$1"> $1 </a>' );} 阅读全文
posted @ 2012-06-07 14:38 Nano 阅读(238) 评论(0) 推荐(0) 编辑
摘要: Math.guid = function(){ return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxx'.replace(/[xy]/g, function(c){ var r = Math.random()*16|0 , v = c == 'x' ? r : (r&0x3|0x8); return v.toString(16); }).toString();}f9a2f2f8-e435-4feb-945c-e375dd0b6be 阅读全文
posted @ 2012-05-31 17:42 Nano 阅读(381) 评论(0) 推荐(0) 编辑
摘要: 比如说 window.alert = function(){}这样的话我们想用弹窗的话就会失效了..如果还想用的话具体解决方法有二种第一种:自己家的不行了就去别人家借一个..window.alert = function(){}function alert(str){ var iframe = document.createElement('iframe'); document.body.appendChild(iframe) iframe.contentWindow.alert(str)}第二种(推荐):只是覆盖了方法,去他老家找他..window.alert = func. 阅读全文
posted @ 2012-05-30 17:36 Nano 阅读(1507) 评论(0) 推荐(0) 编辑
摘要: ie6,7下html的overflow默认是overflow-x:hidden;overflow-y:scroll;其他浏览器是overflow:visible;要让body都overflow:hidden;设置html{overflow:visible;}即可还原在把ie6,7html{overflow-x:hidden;overflow-y:scroll;}就好了人们肯定会说隐藏时候直接把html设置overflow:hidden就好了具体问题还得具体分析吧..如果浏览器滚动一半的时候去设置这个的话非IE浏览器就会滚动到顶部..这肯定不是我想要的..所以还是根据浏览器特定要求来这么做,就没 阅读全文
posted @ 2012-05-30 17:09 Nano 阅读(957) 评论(0) 推荐(0) 编辑