![](https://img-blog.csdnimg.cn/20201014180756918.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
Javascript
KeithRong
这个作者很懒,什么都没留下…
展开
-
JavaScript中类的创建
1.以前的创建方式<script> //定义类 function Hero(name, level){ this.name = name; this.level = level; } //定义类的方法 Hero.prototype.greet = function(){ return `${this.name} says hello`; } //实例...原创 2019-12-22 15:49:58 · 183 阅读 · 0 评论 -
回调地狱
什么是回调地狱?异步JavaScript或使用回调的JavaScript很难直观地得到正确的结果。很多代码最终看起来像这样:<script>fs.readdir(source, function (err, files) { if (err) { console.log('Error finding files: ' + err) } else { fil...转载 2019-04-23 15:11:27 · 2101 阅读 · 1 评论 -
ajax之文件上传
表单上传文件传统的文件上传是通过form表单,俗话说不关注实际问题的解决方法都是假把式,那么我就模拟一个用户注册的功能。观察如下代码:[HttpPost]public ActionResult Upload(string username, string password, string realName, string address, HttpPostedFileBase pictur...原创 2019-04-24 10:07:08 · 1420 阅读 · 0 评论 -
ajax之同步和异步的区别
ajax异步传输最近写代码的时候发现一件事情,那就是ajax异步传输的机制首先来观察下面代码:[HttpPost]public ActionResult GetData(){ return Json("返回的数据");}<h1>Index</h1><div class="container"> <p id="text1"&...原创 2019-04-23 13:54:09 · 1437 阅读 · 0 评论 -
easyui datagrid 调整某列的宽度
$("#table").datagrid("getColumnOption", "field").width = 200;$("#table").datagrid();就2行代码,找了半天网上的答案,不知道都在讲什么。原创 2019-08-23 23:35:47 · 2513 阅读 · 0 评论