
js
yaobo2816
这个作者很懒,什么都没留下…
展开
-
手写promise
自己实现promise功能 const PENDING = 'pending' const FULFILLED = 'fulfilled' const REJECTED = 'rejected' function Promise(executor) { var _this = this this.state = PENDING; //状态 this.value = undefined; //成功结果 this.reason = undefined; //失败原因原创 2021-05-19 19:21:59 · 120 阅读 · 0 评论 -
跳出iframe框架
function onLogout() { if(confirm(确定要注销?)) { parent.document.location.href="../exitSafe.action"; } }原创 2009-09-07 10:53:00 · 369 阅读 · 0 评论 -
返回按钮
value="返回" onclick="javascript:history.go(-1);" />原创 2010-02-20 16:02:00 · 1137 阅读 · 0 评论 -
jquery 常用方法汇总
$("input[@type=radio][@name=gender][@checked]").val() function get_form_value(){ /*获得TEXT.AREATEXT的值*/ var textval = $("#text_id").attr("value");//或者 var textval = $("原创 2010-02-23 15:33:00 · 375 阅读 · 0 评论 -
NodeJS 学习笔记1
首先,创建个hello.js的文件,在文件中copy如下代码: var http = require('http'); http.createServer(function (req, res) { res.writeHead(200, {'Content-Type': 'text/plain'}); res.end('Hello World\n'); }).转载 2015-02-08 00:07:07 · 414 阅读 · 0 评论 -
SWFUpload 眼前的一推坑
SWFUpload 传说是比较给力的文件上传空间 ,flash的 高大上 高大上的背后引入了一些抗, 坑1 : 动态传参数到后台 提交表单的时候需要动态设置 var postobj = {title:encodeURI($("#title").val(),"utf-8"),date:$("#date").datebox("getValue"),isuse:'1',conte原创 2015-11-05 17:24:11 · 491 阅读 · 0 评论