zoukankan      html  css  js  c++  java
  • 取开始日期和字符串

    //Script here
    //result = result.replace("var allSubject = ","");
    //var cc = result.indexOf(';');
    //var listData = result.substr(0,cc);
    var allSubject = null;
    var cc = result.indexOf(';');
    var result = result.substr(0,cc+1);
    var subname_list = [];
    eval(result);
    //var listData = JSON.stringify(allSubject);

    var tmp = [];
    for (var i in allSubject){
    var row = allSubject[i];
    var hotFundYield = row['hotFundYield'];
    var hotFundCode = null;
    var hotFundSname = null;
    var hotFundUnitNetChngPctTyear = null;
    if (hotFundYield)
    {
    hotFundCode=hotFundYield.fundCode;
    hotFundSname=hotFundYield.fundSName;
    hotFundUnitNetChngPctTyear=hotFundYield.unit_net_chng_pct_tyear;
    }else{
    }
    tmp.push({
    'subName':row['subName'],
    'unitNetChngPct1Week':row['unit_net_chng_pct_1_week'],
    'unitNetChngPct1Mon':row['unit_net_chng_pct_1_mon'],
    'unitNetChngPctTYear':row['unit_net_chng_pct_tyear'],
    'unitNetChngPct1Year':row['unit_net_chng_pct_1_year'],
    'hotFundCode':hotFundCode,
    'hotFundSname':hotFundSname,
    'hotFundUnitNetChngPctTYear':hotFundUnitNetChngPctTyear
    });
    };
    tmp.sort(function(a,b){
    return b.unitNetChngPct1Week-a.unitNetChngPct1Week;
    });
    var subname_list = [];
    for (var i in tmp){
    subname_list.push(tmp[i].subName);
    if (subname_list.length>=3){
    break;
    }
    }
    subname_list = subname_list.join(",");
    subname_list=','+subname_list+',';

    var listData = JSON.stringify(tmp);

  • 相关阅读:
    mysql 按出现次数排序
    拼接sql
    java 操作 excel
    jQuery ui 利用 datepicker插件实现开始日期(minDate)和结束日期(maxDate)
    android压力测试命令monkey详解
    java css
    iss 默认上传大小为30 M
    PHP自动生成后台导航网址的最佳方法
    PHP 文件上传的综合实例
    php字符串首字母转换大小写的实例
  • 原文地址:https://www.cnblogs.com/gina11/p/13952520.html
Copyright © 2011-2022 走看看