摘要: Ns.Chart.pie = function () { Ns.Chart.chartBase.apply(this, arguments); this.color = "#0ff11"; this.r = 200; this.cx = -1; this.cy = -1... 阅读全文
posted @ 2015-11-27 17:42 Sekeys 阅读(289) 评论(0) 推荐(0) 编辑
摘要: 最近在编写一个js库采用的是面向对象的思想来进行编写,因此在js继承上有了一定的问题js继承有几种继承方式,分别为原型继承,类似继承,混合继承。原型继承: var child = function(){} var parent = function(){}child.prototype=new p... 阅读全文
posted @ 2014-07-18 10:20 Sekeys 阅读(557) 评论(0) 推荐(0) 编辑
摘要: Ns.UI.AjaxForm = function () { Ns.UI.Control.apply(this, arguments); this.onError = null; this.onSuccess = null; this.onBeforSend = null; this.onCompl... 阅读全文
posted @ 2014-07-17 14:55 Sekeys 阅读(276) 评论(0) 推荐(0) 编辑
摘要: Ns.UI.AjaxForm = function () { Ns.UI.Control.apply(this, arguments);//属于继承 this.onError = null; this.onSuccess = null; this.onBeforSend = ... 阅读全文
posted @ 2014-07-17 12:37 Sekeys 阅读(264) 评论(0) 推荐(0) 编辑
摘要: jq是个很好的js库,但是对于一些要直接操作dom对象,所以需要得到dom对象 jq 里有个方法andSelf,可以获取jq选择的dom对象集合。。不管是否以ID选择还是以其他属性选中,jq始终是以集合的方式解决的。 var eles = $("#adwq").andSelf(); eles是个集合对象。也是dom的集合,这样就可以很好的利用dom解决一些jq不能解决的问题。。如何判断选择是输入控件,其中我们可以使用instanceof,例如: var input = $("input").andSelf(); if(input.length ){ if 阅读全文
posted @ 2013-12-14 20:22 Sekeys 阅读(973) 评论(0) 推荐(0) 编辑
摘要: 近几天弄android自定义对话框的时候发现button点击事件触发不了,后面查了原来是AlertDialog会默认触发DialogInterface.OnClickListener事件,所以应在事件前面添加包名解决这个问题:android.view.View.OnClickListener; /** * 显示自定义的对话框 * * @param context * 上下文 * @param clickListeners * 监听事件组 * @param resId * 控件资源ID组 * @param... 阅读全文
posted @ 2013-09-02 21:31 Sekeys 阅读(1845) 评论(0) 推荐(0) 编辑
摘要: 一般是发送请求到某个应用服务器。此时需要用到HttpURLConnection 先取得HttpURLConnection urlConn = new URL("http://www.google.com").openConnection(); 设置标志 urlConn.setDoOutput(true); urlConn.setDoInput(true);//post的情况下需要设置DoOutput为true urlConn.setRequestMethod("POST"); urlConn.setUseCache(false);//设置是否用缓存 ur 阅读全文
posted @ 2013-08-27 22:00 Sekeys 阅读(454) 评论(0) 推荐(0) 编辑