var jiliduixiang=0; function checkgongjuxiang(){ var va1152=$('input:radio[name="timu_1152"]:checked').val();if(va1152==null){Page.tip("第1.请选择公司类型没选。");huadongmao("timu_1152");return false;} if($('#timu_1156_1').val()==""){Page.tip('不能为空!');huadongmao("timu_1156");$('#timu_1156_1').focus();return false;}if($('#timu_1156_2').val()==""){Page.tip('不能为空!');huadongmao("timu_1156");$('#timu_1156_2').focus();return false;}if($('#timu_1156_3').val()==""){Page.tip('不能为空!');huadongmao("timu_1156");$('#timu_1156_3').focus();return false;}if($('#timu_1156_4').val()==""){Page.tip('不能为空!');huadongmao("timu_1156");$('#timu_1156_4').focus();return false;}if($('#timu_1156_5').val()==""){Page.tip('不能为空!');huadongmao("timu_1156");$('#timu_1156_5').focus();return false;}if($('#timu_1156_6').val()==""){Page.tip('不能为空!');huadongmao("timu_1156");$('#timu_1156_6').focus();return false;}if($('#timu_1156_7').val()==""){Page.tip('不能为空!');huadongmao("timu_1156");$('#timu_1156_7').focus();return false;}if($('#timu_1156_8').val()==""){Page.tip('不能为空!');huadongmao("timu_1156");$('#timu_1156_8').focus();return false;}if($('#timu_1156_9').val()==""){Page.tip('不能为空!');huadongmao("timu_1156");$('#timu_1156_9').focus();return false;}if($('#timu_1156_10').val()==""){Page.tip('不能为空!');huadongmao("timu_1156");$('#timu_1156_10').focus();return false;}if($('#timu_1156_11').val()==""){Page.tip('不能为空!');huadongmao("timu_1156");$('#timu_1156_11').focus();return false;}if($('#timu_1156_12').val()==""){Page.tip('不能为空!');huadongmao("timu_1156");$('#timu_1156_12').focus();return false;}if($('#timu_1156_13').val()==""){Page.tip('不能为空!');huadongmao("timu_1156");$('#timu_1156_13').focus();return false;} if($('#timu_1154_1').val()==""){Page.tip('不能为空!');huadongmao("timu_1154");$('#timu_1154_1').focus();return false;}if($('#timu_1154_2').val()==""){Page.tip('不能为空!');huadongmao("timu_1154");$('#timu_1154_2').focus();return false;} return true; } function huadongmao(mao){ $("html,body").animate({scrollTop: $("#"+mao).offset().top}, 1000); } $('#tijiao').on('click', function() { if(checkgongjuxiang()){ $('#qydc').ajaxSubmit(function(data) { if(data.indexOf("|")>0){ var xinxistr=data.split('|'); var gujiainfo=xinxistr[1].split(','); var nianfeninfo=xinxistr[0].split(','); var jijia= parseFloat(xinxistr[2]); //document.getElementById('main').style.width = window.innerWidth+'px'; $('#main').show(); var myChart = echarts.init(document.getElementById('main')); // 指定图表的配置项和数据 var option = { title: { text: '非上市公司股价计算', subtext:'东掌通', x:'center' }, tooltip : { trigger: 'axis' }, legend: { data:['股价(元/股)'], x: 'left' }, grid: { left: 60 }, xAxis: { boundaryGap : false, data:gujiainfo }, yAxis: [{ type : 'value', axisLabel: { formatter: function (value, index) { return value.toFixed(2); } } }], series: [{ name: '股价(元/股)', type: 'line', label: { normal: { show: true, position: 'top' } }, data:nianfeninfo, markLine: { data:[{yAxis: jijia}] } }] }; // 使用刚指定的配置项和数据显示图表。 myChart.setOption(option); }else{ if(browserRedirect()){ location.href="/login_mobile.html"; }else{ location.href="/login.html"; } //alert("请登录再测试"); } }); } });