摘要: js核心代码: function UploadFile() { var formData = new FormData(); jQuery.support.cors = true; var file = $("#uploadFile")[0].files[0]; formData.append("f 阅读全文
posted @ 2019-06-27 10:50 夜静春山 阅读(4100) 评论(0) 推荐(0)
摘要: C#委托 1.委托就是把方法当做方法的参数来传递, 做自己不想做的事,是存有对某个方法的引用的一种引用类型变量。引用可在运行时被改变。 所有的委托都派生自System.Delegate类 Public delegate 返回类型 委托名称(要传递的参数) (1) 不带参数的委托 (2) 带参数的委托 阅读全文
posted @ 2019-06-15 19:05 夜静春山 阅读(118) 评论(0) 推荐(0)
摘要: 1、 CalculatorDelegate calculatorDel = delegate(double x, double y) //直接定义法 { return x + y; }; Console.WriteLine("委托一个方法的结果为:{0}", calculatorDel(1, 2)) 阅读全文
posted @ 2019-06-15 18:53 夜静春山 阅读(400) 评论(0) 推荐(0)
摘要: try { string strFilePath = Server.MapPath("~") + "/excel/20170206104654.xlsx";//服务器文件路径 FileInfo fileInfo = new FileInfo(strFilePath); Response.Clear( 阅读全文
posted @ 2019-05-31 10:16 夜静春山 阅读(112) 评论(0) 推荐(0)
摘要: <html><head><meta charset="utf-8"></head><body> <p>输入数字并点击验证按钮:</p> <input id="id1" type="number" min="100" max="300"><button onclick="myFunction()">验 阅读全文
posted @ 2019-05-27 12:29 夜静春山 阅读(99) 评论(0) 推荐(0)
摘要: <html> <head> <style type="text/css">body{ margin: 0; padding: 0; } .my-canvas{ margin: 20px; border:10px solid #c3c3c3; } </style></head> <body> <div 阅读全文
posted @ 2019-05-08 21:02 夜静春山 阅读(293) 评论(0) 推荐(0)
摘要: class Program { static void Main(string[] args) { IndexClass a = new IndexClass(); a[0] = "张三"; a[1] = "李四"; a[2] = "王五"; Console.WriteLine("a[0]=" + 阅读全文
posted @ 2019-04-14 14:54 夜静春山 阅读(122) 评论(0) 推荐(0)
摘要: using System; namespace Test{ [AttributeUsage(AttributeTargets.Property)] public class StringLengthtAttribute : Attribute { private int _maximumLength 阅读全文
posted @ 2019-04-14 14:16 夜静春山 阅读(110) 评论(0) 推荐(0)