摘要:
JS方法执行顺序Demo//js.js文件方法如下function get_msg(str){ alert("js文件中方法!"+str);} 结果提示顺序:1.页面中的方法2.Js文件中的方法ok(defer中延迟加载方法,会在onload事件之前执行)3.OnLoad中的方法 阅读全文
摘要:
declare @tbl table(name varchar(20),age datetime)insert into @tbl select 'jacky','1985-12-23' union select 'myjacky','1986-12-10' unionselect 'myjacky','1986-12-12' unionselect 'jacky','1988-09-23'--方法一select a.* from @tbl a inner join 阅读全文
摘要:
// JScript 文件$(document).ready(function(){ $("#divJson").html("<font color=green>数据加载中。。。</font>"); $.getJSON("MyAjax.aspx",function(json){ var str=""; var jsonList =json.list; //方法一: /*$.each(jsonList,function(i){ str+="ID:"+jsonList[i]. 阅读全文
摘要:
C#版 using System.Runtime.Serialization.Json; using System.IO; /// /// C#反序列化JSON /// /// 返回类型 /// JSON字符串 /// public static T JsonDeserialize(string strJson) { DataContractJsonSerializer ser = new DataContractJsonSerializer(typeof(T)); MemoryStream ms = n... 阅读全文
摘要:
//JS文件////构造函数(function(){ }())//基类function BaseCar(){//基类属性this.color="";this.name="";this.len="";}//基类方法BaseCar.prototype={//取得车的基本参数GetCarParater:function(){alert("基本参数\r\n车名:"+this.name+",颜色:"+this.color+",长度:"+this.len);},//取得车的生产厂家Get 阅读全文