html报错:Uncaught TypeError的错误,求解答

html报错:Uncaught TypeError: $(...).dropdown is not a function,但是控制台没有报错,页面的下拉图标没有显示,这是哪里出错了呢?引用的js以前还是可以用的。

9个回答

先检查js路径是否正确,js的引入顺序是否正确
,错误原因是$().dropdown不是一个函数,但是却当做函数执行

应该是$().dropdown()

先检查js路径是否正确,js的引入顺序是否正确
,错误原因是$().dropdown不是一个函数

检查 $(...).dropdown

dropdown,没有这个函数,你用的easyui之类的库,但是没有引用正确

先检查你是否引入bootstrap.js插件,引入的顺序应该是jQuery.js,bootstrap.js,然后是你的自己的.js

dropdown 插件引用了吗?在用$(...).dropdown() 的时候,实例化这个插件了吗?检查一下咯~

$(...) 对象不存在

谢谢大家的热心回答,我的是easyUI和Boostrop两个类库冲突了,删除一个就好了。
所以问题又来了
如何在一个页面同时用easyUI和bootstrap呢?

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
其他相关推荐
jsp页面Uncaught TypeError报错怎么解决呀
小弟我最近项目中碰到一个问题:rn我在一个系统中拷贝了别的项目的jsp文件,文件中用到的css等文件夹也一起拷贝过来了,但是用谷歌浏览器打开项目的时候,报一个错误:Uncaught TypeError: $(...).dialog is not a functionrn如图:rn[img=https://img-bbs.csdn.net/upload/201511/23/1448241568_734823.png][/img]rn请问下大家,应该怎么解决啊?或者哪里出问题了,帮小弟提供个思路。。不胜感激rn
Uncaught TypeError: layout.onItemAdd is not a function
sencha-touch-all-debug.js:33670 Uncaught TypeError: layout.onItemAdd is not a function
Uncaught TypeError: $(...).appendChild is not a function
//动态添加中奖纪录rn list1 = '' + rank + '' + ' ' + '' + nickname + '' + showxb + '' + ' ' + lastModifyTime + '';rn var newDiv1=document.createElement('div');rn newDiv1.className="showlist1";rn var j=i+5;rn newDiv1.setAttribute("id","list"+j);rn //this.html(list1);rn //newDiv1.html(list1);rn $(".showlist1").html(list1);rn $("#mainContent").appendChild(newDiv1);
Uncaught TypeError: $(...).jqGrid is not a function
$("#jqGridTableId").jqGrid(rn url : Eservice.ctx +'/ebiz/inquire/contNoShow.action?action=getPolicyList&ajax=true',rn mtype : 'POST',rn postData : rn heartStatus:$("#heartStatus").val(),rn contNo:$("#contNo").val(),rn riskCode:$("#riskCode").val(),rn planCode:$("#planCode").val(),rn channelName:$("#channelName").val(),rn productChannel:$("#productChannel").val(),rn name:$("#name").val(),rn paymentName:$("#paymentName").val(),rn bizeCode:$("#bizeCode").val()rn ,rn datatype : "xml",rn colNames : ['渠道代码', '订单号', '险种代码','款别',rn '投保人', '支付方式', '支付状态', '导入状态', '业务类型','操作'],rn colModel : [rn name : 'cont_no',rn index : 'cont_no',rn align : 'center',rn sortable : false,rn width: 90rn ,rn name : 'product_Channel',rn index : 'product_Channel',rn hidden : truern ,rn name : 'bize_code',rn index : 'bize_code',rn align : 'center',rn sortable : false,rn width: 90rn ,rn name : 'risk_code',rn index : 'risk_code',rn align : 'center',rn formatter : 'date',rn sortable : false,rn width: 55rn ,rn name : 'plan_code',rn index : 'plan_code',rn align : 'center',rn sortable : false,rn width: 120rn ,rn name : 'name',rn index : 'name',rn align : 'center',rn sortable : false,rn width: 55rn ,rn name : 'payment_name',rn index : 'payment_name',rn align : 'center',rn sortable : false,rn width: 50,rn formatter:function(val,rec) rn var cname;rn if(val=='1')rn cname="已支付";rn else if(val=='2')rn cname="未支付";rn else if(val=='3')rn cname="支付失败";rn rn return cname; rn rn ,rn name : 'heart_status',rn index : 'heart_status',rn align : 'center',rn sortable : false,rn width: 50 ,rn formatter:function(val,rec) rn var cname;rn if(val=='1')rn cname="已导入";rn else if(val=='2')rn cname="未导入";rn else if(val=='3')rn cname="导入失败";rn rn return cname; rn rn ,rn name : 'BIZE_CODE',rn index : 'BIZE_CODE',rn align : 'center',rn sortable : false,rn width: 75,rn formatter:function(val,rec) rn var cname;rn if(val=='101')rn cname="投保";rn else if(val=='102')rn cname="退保";rn else if(val=='103')rn cname="投保批改";rn else if(val=='104')rn cname="异步返回";rn else if(val=='105')rn cname="注销";rn rn return cname; rn rn ,rn name : 'oper',rn index : 'oper',rn align : 'center',rn sortable : false,rn width: 75rn ],rn shrinkToFit : true,rn rowNum : 10,rn rowList : [ 10, 30, 50 ],rn pager : '#jqGridPagerId',rn viewrecords : true,rn xmlReader : rn repeatitems : false,rn root : "object",rn row : "map",rn page : 'page',rn total : 'total',rn records : 'records'rn ,rn caption : "订单信息",rn height:'auto',rn gridComplete: function() //获得所有行的ID数组 rn var ids = $("#jqGridTableId").jqGrid('getDataIDs');rn var contNo=$('#contNo').val();rn for(var i=0;i < ids.length;i++) rn var arr = $("#jqGridTableId").jqGrid('getRowData',ids[i]);rn var linkReq = "" + arr.cont_no + "";rn $("#jqGridTableId").jqGrid('setRowData',ids[i],cont_no:linkReq);rn rn var linkHis = "" + 日志 + "";rn $("#jqGridTableId").jqGrid('setRowData',ids[i],oper:linkHis);rn var linkDetail = "" + 详情 + "";rn $("#jqGridTableId").jqGrid('setRowData',ids[i],oper:linkDetail);rn var linkDown = "" + 电子保单下载 + "";rn $("#jqGridTableId").jqGrid('setRowData',ids[i],oper:linkDown);rn rn rn );rnrn报:Uncaught TypeError: $(...).jqGrid is not a function错误,请各位大神指点
Uncaught TypeError: undefined is not a function
[code=javascript]rn $("div_chi").innerHTML = "";rn [ 'Num' ].each(function(hashName) rn var tagArr1 = $$('span[_cancas="cancas"][_group="' + hashName + '"]');rn var myfun = function() rn Cancas(tagArr1, 1, '#3A617F');rn ;rn myfun.delay(10);rn );rn[/code]rnrn[ 'Num' ].each(function(hashName) 提示Uncaught TypeError: undefined is not a function怎么解决?
Uncaught TypeError: this.loaduserbyclsid is not a function
rn[code=javascript]rnMyClassList.prototype.loadmyclasssuccess = function (result) rn hideMask();rn if (result && result.retFlag) rn $("#myclasspanel div").remove();rnrn var tbody = $(' ' + rn ' ' + value.className +rn ' ');rnrn tbody.bind("click", p: this, selclass: value, function (event) rn rn event.data.p.selectonclass(event.data);rn );rnrn $("#myclasspanel").append(tbody);rnrn rnrnrn//按钮事件rnMyClassList.prototype.selectonclass = function (clsid) rn showMask();rnrnrnrn[/code]rnrnrn以上代码, 运行到 loadmyclasssuccess 都没有问题, 但执行 bind 里面的 event.data.p.selectonclass(event.data); 出现错误rnrnrnUncaught TypeError: this.loaduserbyclsid is not a functionrn at HTMLDivElement. (myuser.js:115)rn at HTMLDivElement.dispatch (jquery-1.10.2.js:5095)rn at HTMLDivElement.elemData.handle (jquery-1.10.2.js:4766)rnrnrn网上有说是jquery的问题,但代码中已经加载了jquery, rn请指导rnrn
Uncaught TypeError: $(...).datetimepicker is not a function
在使用datetimepicker时候遇到了这个问题。我那些该有的文件都有引入的。rnrn[code=html]rn rn rn rnrn rn rn rn rn rn rn rnrn [/code]rnrn请问应该怎么办?
DataTable 报错: Uncaught TypeError: Cannot read property 'nTable' of null
DataTable 报错,如图:rn ![图片说明](https://img-ask.csdn.net/upload/201812/02/1543741896_662267.jpg)rn 请问是什么原因导致
为什么js报错 Uncaught TypeError: undefined is not a function
[img=https://img-bbs.csdn.net/upload/201603/22/1458625951_71381.png][/img]
$.getJSON报错Uncaught TypeError: Cannot read property 'id' of undefined
[code=javascript]rninput.keyup(function()rn var $key = input.val();rn if($key=='')rn suggestWrap.hide();rn elsern $.getJSON('__URL__/countryType',ckey:$key,function(data)rn if (data.data!=null)rn suggestWrap.show();rn $('#add li[text!=""]').remove();rn for (var i=0;i<=data.data.length;i++)rn var option = " "+data.data[i].id+"";rn $(option).appendTo('#add');rn rn elsern suggestWrap.hide();rn rn ); rn rn )rn[/code]rn使用$.getJSON时总报这样的错rnUncaught TypeError: Cannot read property 'id' of undefined
getElementsByTagName('*');出现错误"Uncaught TypeError: undefined is not a function"
[code=javascript]rnfunction getByClass(oParent, sClass)rn var son = [];rn var oSon = oParent.getElementsByTagName('*');rn for(var i=0; i
谷歌浏览器报错误 Uncaught TypeError: object is not a function register.jsp:53onblur
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>rn<%@ taglib uri="/struts-tags" prefix="s" %>rn<%rnString path = request.getContextPath();rnString basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";rn%>rnrnrnrn rn rn 用户注册rn rn rn rnrnrn rn rn rn 新用户注册rn 填写个人信息rn rn rn rn rn rn rn 用户名rn *rn rn rn rn rn 密码rn *rn rn rn rn 确认密码rn *rn rn rn rn 电话rn rn rn rn rn 用户真实名rn rn rn rn rn rn rn rn rn rnrnrnrnrnrnrn以上是代码但是没找到错误
eCharts Uncaught TypeError: myChart.addMarkLine is not a function
调用 addMarkLine()出现此错误,请问是什么原因?rnrnUncaught TypeError: myChart.addMarkLine is not a function
Uncaught TypeError: Cannot set property 'display'
本意是,点击回复按钮,弹出当前楼的回复框。可是运行报错[img=https://forum.csdn.net/PointForum/ui/scripts/csdn/Plugin/003/onion/18.gif][/img]rnjsp:rn 最新评论 rn rn rn rn rn $reply.user.unamern rn $reply.rtime rn $reply.rcontext rn rn 评论rn rn rn rn rn rn rn rn rn rnjs:rnrn function pl(obj)rn var oComment = obj.parentNode.nextSibling; rn if(oComment.style.display=="none")rn oComment.style.display="block";rn elsern oComment.style.display="none";rn rn
求解 错误:Uncaught TypeError: Cannot set property 'display' of undefined
js问题 Uncaught TypeError: Cannot set property 'display' of undefined 求帮助rn[img=https://img-bbs.csdn.net/upload/201607/22/1469123065_196363.jpg][/img]rn出错 js代码是 :rnrnvar oChai = document.getElementById("chai");rnvar oContainer = document.getElementById("container");rnrnshowmain.style.display = "none";rnoChai.onclick = function() oChai.setAttribute("class", "rotate");rnsetTimeout(function() rnoContainer.remove();rnshowmain.style.display = "";rnvar a=0;rnvar gundong=setInterval(function()rnrn a+=1;if(a>=188)rn clearInterval(gundong);rnrn document.getElementById('get_money').innerHTML=a;rn,6);rn,1600)rn
Uncaught TypeError: Cannot read property '0' of null
html代码: rnrn rn rn rn rnrnrncss代码: rn.div1width:300px;height:300px;background-color:#ff00ff; rnrnrnjs代码: rnrnrnrnfunction changeColor(changeobj) rn rn var mycss=document.styleSheets[0].cssRules || document.styleSheets[0].rules; rn rn var div1=mycss[0].style.backgroundColor; //这一行提示360和chrome提示:Uncaught TypeError: Cannot read property '0' of null rn rn if(changeobj.value=="黑色") rn rn div1.style.backgroundColor="black"; rn rn else if(changeobj.value=="红色") rn rn div1.style.backgroundColor="red"; rn rn else if(changeobj.value=="复原") rn rn div1.style.backgroundColor="#ff00ff"; rn rn rn rn
Uncaught TypeError: Cannot read property 'path' of undefined
出现Uncaught TypeError: Cannot read property 'path' of undefined 错误,但是我所有的变量定义里都没有“path”这个东西,不知道是哪里来的?哪位大师帮忙指点一下。[img=https://img-bbs.csdn.net/upload/201406/25/1403680975_69275.jpg][/img]
Uncaught TypeError: Cannot read property 'top' of undefined
HTMLrnrnrnrn rn 多图文rn rn rn rn rnrnrnrn rn rn rn rn 封面图片rn rn rn 摘要rn rn rn 修改rn rn rn rn rn rn 标题rn rn 预览图rn rn rn rn 修改rn 删除rn rn rn rn 添加一个图文rn rnrnrn rn rn rn 标   题:rn rn rn rn 封   面:rn rn rn rn rn rn 关 联 类 型:rn rn 请选择一个关联的类型...rn 微专题rn 自定义链接rn rn rn rn 微  专 题:rn rn 圣诞特惠rn 双十二狂欢rn rn rnrn rn 自定义链接:rn rn rn rn rn rn rnrn rnrnrn rn rn rnrn查看json对象rn验证数据合法性rn模拟修改图文json数据rnrnrnrnrnJS代码:rn//当前编辑的图文IDrnvar boxIdN = 1;rnrn//一共存在多少个图文rnvar n=3;rn//图文json对象rnvar tws=[];rnvar tw=function()return"BoxId":"","Title":"","UrlType":"","TopicID":"","Url":"","Description":"","PicUrl":"","Status":""rnntw = new tw();rnntw.BoxId = 1;rntws.push(ntw);rnntw = new tw();rnntw.BoxId = 2;rntws.push(ntw);rnrn$(document).ready(function()rn $('#picfile').change(function()rn $('#fmSrc').val($(this).val());rn )rn rn $('#sBox1').hover(function()rn $(this).find('.layer_mask').show();rn ,function()rn $(this).find('.layer_mask').hide();rn );rnrn//事件on可以将动态的效果直接添加进来rn $('.tw_box').on('mouseenter mouseleave','.twSBox',function()rn $(this).find('.layer_mask').toggle(); rn );rnrn//删除图文rn $('.tw_box').on('click','.del',function()rn if($('.twSBox').length == 2)rn alert('请至少保存两个图文信息');rn elsern $(this).parent().parent().remove(); rn editTW(parseInt(1));rn rn );rn rn//追加图文rn $('.boxAdd a').click(function()rn if($('.twSBox').length < 10)rn var str=' '+' 标题 预览图 修改删除'+'';rn var ntw = new tw();rn ntw.BoxId = n;rn tws.push(ntw);rn n=n+1; rn $('.boxAdd').before(str);rn elsern alert('最多可添加10个图文');rn rn );rnrn//修改图文rn$('.tw_box').on('click','.revise',function()rn var thisId=$(this).parent().parent().attr('id');rn thisId=thisId.replace(thisId.substring(0,4),'');rn editTW(thisId);rn);rnrn);/*$(document).ready(function() end*/rnrn//修改图文rnfunction editTW(sBoxId)rn //保存对象到jsonrn saveDataToJson();rn boxIdN = sBoxId;rn //移动模型rn moveBox();rn //初始化数据,清空图文rn initBox();rn //载入模型数据对象rn loadData();rnrnrn//修改图文1rnfunction edit(sBoxId)rn //保存对象到jsonrn saveDataToJson();rn boxIdN = sBoxId;rn //初始化数据,清空图文rn initBox();rn //载入模型数据对象rn loadData();rnrnrn//移动rnfunction moveBox()rn var h = $('#sBox' + boxIdN).offset().top;rn $('#box_move').animate(top:h+'px');rn// $('#box_move').animate(top:$('#sBox'+boxIdN).offset().top,800);rnrnrn//select联动rnfunction changeType(selectVal)rn if('1' == selectVal) rn $("#topics").show();rn $("#define_link").hide();rn else if ('2' == selectVal) rn $("#topics").hide();rn $("#define_link").show();rn else if('0' == selectVal)rn $("#topics").hide();rn $("#define_link").hide();rn rnrnrn//初始化数据,清空图文rnfunction initBox()rn $("#title").val("");rn $("#picfile").val("");rn $("#typeID").val("0");rn $("#topics").hide();rn $("#define_link").hide();rn $("#valueID option").attr("selected","selected");rn $("#urlData").val("http://");rnrnrn//保存对象到jsonrnfunction saveDataToJson()rn for(var a=0; a=2)rnrn if($('.tw_box .layer_mask').length < 10)rn var str=' '+' 标题 预览图 '+$('.zzc_sBox2').html()+''+'';rn var ntw = new tw();rn ntw.BoxId = n;rn tws.push(ntw);rn n=n+1; rn $('.boxAdd').before(str);rn elsern alert('最多可添加10个图文');rn rn rn if(!isNull(tws[a].Title))rn $("#title"+(parseInt(a)+1)).text(tws[a].Title);rn rn if(!isNull(tws[a].PicUrl))rn $("#img"+(parseInt(a)+1)).attr("src",(tws[a].PicUrl)).show();rn rn rnrn当我验证Json数据时,在删除一个图文后验证会出错Uncaught TypeError: Cannot read property 'top' of undefined ,求大神帮我看下代码,非常感谢
Uncaught TypeError: Object # has no method 'datepicker'
[code=Java] rn rn rn rn rn [/code]rnrn[code=Java]Date: [/code]rnrn[code=Java]rn rn[/code]rnrnUncaught TypeError: Object # has no method 'datepicker'rn(anonymous function)Booking1.jsp:294rnjQuery.fn.extend.readyjquery.min.js:27rnjQuery.extend.ready.jQuery.readyListjquery.min.js:27rnjQuery.extend.eachjquery.min.js:21rnjQuery.extend.ready rn不知什麼事情?原本是用到,不過近日就用不到,真奇怪rn
Uncaught TypeError: Cannot read property 'parentNode' of undefined
本人新人,最近在学javascript,使用chrome调试js时出现Uncaught TypeError: Cannot read property 'parentNode' of undefined,不知道如何解决,希望有人能帮忙,十分感谢·rnrnrnrnrn rn new document rn rn rn rn rn rn rn 工号rn 姓名rn 选项rn rnrn rn 01rn 小明rn 删除 rn rnrn rn 02rn 小王rn 删除 rn rnrn rn rn rnrn
Uncaught TypeError:$(".default-select2").select2 is not a function
我在aspx页面中使用了一个System.Web.UI.HtmlControls.HtmlSelect控件:rnrnrn 页面的JS代码如下:rnrn rnrn  页面加载时,select控件通过后台的cs文件加载数据,选择控件中的某条数据,页面中的列表显示相应的数据。rnrn  现在的问题是,页面有时会显示空白,提示的错误如标题,即:rn  Uncaught TypeError:$(".default-select2").select2 is not a functionrn 但刷新一下,页面又正常显示了。rnrn  前面的JS代码中,标红色的是第一版的代码,标青色的是改动过的代码,但均出现过同样的错误提示。rnrn  请教大家,是什么原因导致的这个问题?怎样解决呢?rn 请大家帮忙,谢谢!rn
Uncaught typeError:Cannot read property 'style' of undefined
想实现点击某项,可弹出框,并且背景灰色且不可操作。运行后发现没弹出框,Chrome中调试发现到红色行时报错:Uncaught typeError:Cannot read property 'style' of undefinedrn各位谁知道怎么回事?怎么解决??rnjs: rnfunction locking(id) rn [color=#FF0000]document.all.zzjs_net.style.display = "block";[/color] document.all.zzjs_net.style.width = document.body.clientWidth;rn document.all.zzjs_net.style.height = document.body.clientHeight;rn $("#www_zzjs_net_" + id).css("display", "block");rnrn document.body.style.overflow = "hidden";rnrnrnrnhtml:rn );" class="menu_one" style="cursor:pointer;">rn rn <%#Eval("Number")%>.<%#Eval("MenuName_EN")%>rn rn rnrn " >
Uncaught TypeError: Cannot read property 'replace' of null
formatter : function(value,v,row) rn var res = ' ';rn [color=#FF0000]var str='sdfhsdf';[/color]rn debugger;rn if(trim(row.disabled) == '1')rn res = '';rn elsern [color=#FF0000]str=(row.factorDetail).replace(";","。");;[/color]rn //alert(str);rn res =' 'rn +' 'rn +'天蓝蓝'+str+''rn +'';rn rn return res;rn ,rn红色部分在运行,使用alert的时候可以弹出,但是会出现如下错误:rnUncaught TypeError: Cannot read property 'replace' of nullrn at HTMLTableElement.formatter (input.do?id=1F366563E85B47DD9E5B802BEE4DDAFE:162)rn at x (jquery.jqGrid.min.js:50)rn at G (jquery.jqGrid.min.js:50)rn at Y (jquery.jqGrid.min.js:66)rn at Object.success (jquery.jqGrid.min.js:81)rn at fire (jquery-1.11.1.js:3119)rn at Object.fireWith [as resolveWith] (jquery-1.11.1.js:3231)rn at done (jquery-1.11.1.js:9275)rn at XMLHttpRequest.callback (jquery-1.11.1.js:9685)rn在线等,这是什么原因,该如何解决
JavaScript编译时Uncaught TypeError: undefined is not a function
JavaScript编译时Chrome报告Uncaught TypeError: undefined is not a function错误[img=https://img-bbs.csdn.net/upload/201406/25/1403667885_87279.jpg][/img]
jquery中报Uncaught TypeError: pie is not a function
rnrn```rn $(function()rn var name = new Array();rn var value=new Array();rn var count = new Array();rn $.post(rn "BaseAction/SheetAction/ContributeSheetPie",rn function(data)rn rn name=data.name;rn value=data.value;rn pie(value,name);rn ,rn "json"rn );rn $('#show').click(function()rn var i=1;rn var pie=document.getElementById('pie');rn var bar=document.getElementById('bar');rn if(i==1)rn rn var count = new Array();rn pie.style.display="none";rn bar.style.display="block";rn $.post(rn "BaseAction/SheetAction/ContributeSheet",rn function(data)rn rn name=data.name;rn count=data.count;rn bar(name,count);//Uncaught TypeError: bar is not a functionrn ,rn "json"rn );rn i=0;rn rn if(i==0)rn rn pie.style.display="block";rn bar.style.display="none";rn $.post(rn "BaseAction/SheetAction/ContributeSheetPie",rn function(data)rn rn name=data.name;rn value=data.value;rn pie(value,name);//Uncaught TypeError: pie is not a functionrn ,rn "json"rn );rn rn rn );rn );rn //---------------------------pie饼形分析图--------------------------------------------------------------------------------rn function pie(value,name)rn rn // 路径配置rn require.config(rn paths: rn echarts: '<%=path%>/js/echarts/build/dist'rn rn );rn require(rn [rn 'echarts',rn 'echarts/chart/pie',rn 'echarts/chart/funnel'rn ],rn function (ec)rn rn // 基于准备好的dom,初始化echarts图表rn var myChart = ec.init(document.getElementById('pie'));rn var option = rn title :rn rn text: '顾客贡献',rn x:'center'rn ,rn tooltip :rn rn trigger: 'item',rn formatter: "a b : c (d%)"rn ,rn legend:rn rn orient : 'vertical',rn x : 'left',rn data:namern ,rn toolbox:rn rn show : true,rn feature :rn rn mark : show: true,rn dataView : show: true, readOnly: false,rn magicType :rn rn show: true,rn type: ['pie', 'funnel'],rn option:rn rn funnel:rn rn x: '25%',rn width: '50%',rn funnelAlign: 'left',rn max: 1548rn rn rn ,rn restore : show: true,rn saveAsImage : show: true,rn rn ,rn calculable : true,rn series :rn [rn rn name:"订单数",rn type:"pie",rn radius : '55%',rn center: ['50%', '60%'],rn data :valuern rn ]rn ;rn // 为echarts对象加载数据rn myChart.setOption(option);rn rn rn );rn ;rn //---------------------------pie饼形分析图--------------------------------------------------------------------------------rn function bar(name,count)rn rn // 路径配置rn require.config(rn paths: rn echarts: '<%=path%>/js/echarts/build/dist'rn rn );rn // 使用rn require(rn [rn 'echarts',rn // 使用柱状图就加载bar模块,按需加载rn 'echarts/chart/line',rn 'echarts/chart/bar'rn ],rn function (ec) rn // 基于准备好的dom,初始化echarts图表rn var myChart = ec.init(document.getElementById('bar'));rn var option = rn tooltip: rn trigger:'axis',rn ,rn legend: rn data:['贡献度']rn ,rn toolbox: rn show : true,rn feature : rn mark : show: true,rn dataView : show: true, readOnly: false,rn magicType : show: true, type: ['line', 'bar'],rn restore : show: true,rn saveAsImage : show: truern rn ,rn calculable : true,rn xAxis : [rn rn type : 'category',rn data : namern rn ],rn yAxis : [rn rn type : 'value'rn rn ],rn series : [rn rn "name":"订单数",rn "type":"bar",rn "data":count,rn markPoint : rn data : [rn type : 'max', name: '最大值',rn type : 'min', name: '最小值'rn ]rn ,rn markLine : rn data : [rn type : 'average', name: '平均值'rn ]rn rn rn ]rn ;rn // 为echarts对象加载数据rn myChart.setOption(option);rn rn );rn ;rn rn```rnrn
Uncaught TypeError: Cannot read property 'className' of undefined
为什么28行会找不到classname呢?有点费解,css设置错误了么rn[code=javascript]rnrnrnrn rn 无标题文档rn rnrnrnrn rn rn Xrn rn rn QQ登录界面rn rnrn rnrnrnrn[/code]
求助啊 Uncaught TypeError: $(...).citySel is not a function
这个 错 折磨 我一天了 rn//设置下拉rn [code=javascript]rn$("#pcdAddress").citySel(rn prov:remote_ip_info['province'], //省份 rn city:remote_ip_info['city'], //市rn dist:remote_ip_info['district'], //街道rn nodata:"none" //当子集无数据时,隐藏select rn );[/code]rnrnrn[code=javascript]rn(function($)rn $.fn.citySel=function(settings)rn if(this.length<1)return;;rn rn // 默认值rn settings=$.extend(rn url:null,rn prov:null,rn city:null,rn dist:null,rn nodata:null,rn required:truern ,settings);rn rn var box_obj=this;rn var prov_obj=box_obj.find("#prov");rn var city_obj=box_obj.find("#city");rn var dist_obj=box_obj.find("#dist");rn var prov_val=settings.prov;rn var city_val=settings.city;rn var dist_val=settings.dist;rn var select_prehtml=(settings.required) ? "" : "请选择";rn var city_json;rn rn // 赋值市级函数rn var cityStart=function()rn var prov_id=prov_obj.get(0).selectedIndex;rn if(!settings.required)rn prov_id--;rn ;rn city_obj.empty().attr("disabled",true);rn dist_obj.empty().attr("disabled",true);rn rn if(prov_id<0||typeof(city_json.citylist[prov_id].c)=="undefined")rn if(settings.nodata=="none")rn city_obj.css("display","none");rn dist_obj.css("display","none");rn else if(settings.nodata=="hidden")rn city_obj.css("visibility","hidden");rn dist_obj.css("visibility","hidden");rn ;rn return;rn ;rn rn // 遍历赋值市级下拉列表rn temp_html=select_prehtml;rn $.each(city_json.citylist[prov_id].c,function(i,city)rn temp_html+=""+city.n+"";rn );rn city_obj.html(temp_html).attr("disabled",false).css("display":"","visibility":"");rn distStart();rn ;rn rn // 赋值地区(县)函数rn var distStart=function()rn var prov_id=prov_obj.get(0).selectedIndex;rn var city_id=city_obj.get(0).selectedIndex;rn if(!settings.required)rn prov_id--;rn city_id--;rn ;rn dist_obj.empty().attr("disabled",true);rn rn if(prov_id<0||city_id<0||typeof(city_json.citylist[prov_id].c[city_id].a)=="undefined")rn if(settings.nodata=="none")rn dist_obj.css("display","none");rn else if(settings.nodata=="hidden")rn dist_obj.css("visibility","hidden");rn ;rn return;rn ;rn rn // 遍历赋值市级下拉列表rn temp_html=select_prehtml;rn $.each(city_json.citylist[prov_id].c[city_id].a,function(i,dist)rn temp_html+=""+dist.s+"";rn );rn dist_obj.html(temp_html).attr("disabled",false).css("display":"","visibility":"");rn ;rn rn var init=function()rn // 遍历赋值省份下拉列表rn temp_html=select_prehtml;rn $.each(city_json.citylist,function(i,prov)rn temp_html+=""+prov.p+"";rn );rn prov_obj.html(temp_html);rn rn // 若有传入省份与市级的值,则选中。(setTimeout为兼容IE6而设置)rn setTimeout(function()rn if(settings.prov!=null)rn prov_obj.val(settings.prov);rn cityStart();rn setTimeout(function()rn if(settings.city!=null)rn city_obj.val(settings.city);rn distStart();rn setTimeout(function()rn if(settings.dist!=null)rn dist_obj.val(settings.dist);rn ;rn ,1);rn ;rn ,1);rn ;rn ,1);rn rn // 选择省份时发生事件rn prov_obj.bind("change",function()rn cityStart();rn );rn rn // 选择市级时发生事件rn city_obj.bind("change",function()rn distStart();rn );rn ;rn rn // 设置省市json数据rn if(typeof(settings.url)=="string")rn $.getJSON(settings.url,function(json)rn city_json=json;rn init();rn );rn elsern city_json=settings.url;rn init();rn ;rn ;rn )(jQuery);rn[/code]
小白求问:Uncaught TypeError: Cannot read property 'getElementsByTagName' of null
我在做一个tab标签的网页 可是这里显示了这个错误:Uncaught TypeError: Cannot read property 'getElementsByTagName' of null 我也百度了很多 但是不知道咋错了 我也有li这个标签 为啥会是空呢 下面是部分代码 rnscript:window.onload = function() rn var oMain = document.getElementById('main');rn var oDiv = getByClass(oMain,'main3');rn [color=#FF0000]var oLi = getByClass(oMain,'mainBar')[0].getElementByTagName('li');[/color]/*这行显示有问题/*rn var i = 0;rn for (i = 0;i < oLi.length;i++) rn oLi[i].index=i;rn oLi[i].onmouseover = function() rn for (i = 0;i < oLi.length;i++) rn oDiv[i].style.display='none';rn alert('a');rn rn oDiv[this.index].style.display='block';rn ;rn rn ;rn function getByClass(oParent, sClassName)rn var aElm=oParent.getElementsByTagName('*');rn var aArr=[];rn for(var i=0; irn rn 汽车rn 影视rn 体育rn rn rnrnrn这个是总体布局的代码: rn rn rn rn rn rn 习近平主持政治局会议审议中国共产党问责条例rn rn rn rn rn rn rn rn 上海市委常委屠光绍任中投公司总经理 接替李克平rn rn rn rn rn rn rn rn 媒体:3名省部级高官违规为何低调处理?rn rn rn rn rn rn rn rn rn rn rn rn rn rn 科员私吞九百万养老金,养老缴费“骗局”为何易得逞rn rn rn rn rn rn rn rn 汽车rn rn rn 影视rn rn rn 体育rn rn rn rn rn rn rn rn rn rn rn rn 比亚迪秦100内饰谍照曝光 下半年上市rn rn rn rn rn rn rn rn rn rn 被“鸡蛋”冰雹袭击后 保险公司说车玻璃不赔rn rn rn rn rn rn rn rn rn rn 新轮医疗服务价格改革将启动:部分手术及中医将涨价rn rn rn rn rn rn rn rn rn rn 北京二手房成交量现断崖式下跌 一线楼市将豪宅化rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn 10年间!万科到底卖了多少房子?rn rn rn rn rn rn rn rn rn rn rn rn rn rn 毒品是如何让人上瘾的?不同毒品对人体有何伤害rn rn rn rn rn rn rn rn rn rn rn rn rn rn 英国脱欧和非富国:富国的平民在反击我们!rn rn rn rn
错误: uncaught exception 是什么错误?
错误: uncaught exception: [Exception... "Component returned failure code: 0x805e000a [nsIXMLHttpRequest.open]" nsresult: "0x805e000a ()" location: "JS frame :: http://192.168.1.75/js/ajax.js :: GetResult :: line 15" data: no]rnrnrnajax.jsrn===============rn// JavaScript Documentrnfunction GetResult(url)rn var showmov = null;rn if(window.XMLHttpRequest) //IE7, Mozilla ,Firefox 等浏览器内置该对象rn rn showmov = new XMLHttpRequest();rn rn else if(window.ActiveXObject) //IE6、IE5rn rn try showmov = new ActiveXObject("Msxml2.XMLHTTP"); catch (e) ; rn rn if( showmov == null) try showmov = new ActiveXObject("Microsoft.XMLHTTP"); catch (e); rn rn rn showmov.open("post",url,false);rn showmov.send(null);rn if(showmov.readyState == 4) rn if(showmov.status == 200) rn var strResult = showmov.responseText;rn rn rn showowmov = nullrn return strResult;rn
求解答,网站报错
网站调试的时候总报错:rnrn命令“del ……\webapp\bin\dotcms.data.sqlite.* del ……\webapp\bin\System.Data.SQLite.DLL”已退出,代码为 1.rnrn命令“del ……\webapp\bin\dotcms.editor.tinymce.*”已退出,代码为 1 。rnrn数据库用的是SQLite 那位高人遇到过类似情况,帮忙解答一下。
Maven报错,求解答
刚刚安装maven3rn执行命令 mvn help:systemrnrn报下面的错误:rnrn[ERROR] Failed to execute goal org.apache.maven.plugins:maven-help-plugin:2.1.1:rnsystem (default-cli) on project standalone-pom: Execution default-cli of goal orrng.apache.maven.plugins:maven-help-plugin:2.1.1:system failed: Plugin org.apache.rnmaven.plugins:maven-help-plugin:2.1.1 or one of its dependencies could not be rernsolved: Failure to find junit:junit:jar:3.8.1 in http://repo.maven.apache.org/marnven2 was cached in the local repository, resolution will not be reattempted untirnl the update interval of central has elapsed or updates are forced -> [Help 1]rnrn怎么解决?
指针数组报错,求解答
rn我这么写rn[code=c]char* arr[] = "AA", "BB", "CC";[/code]rnrn出现报错rnwarning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]rnrn我这么写不对吗,网上找了好多人都是这么写的,为什么我就报错了
python——导入excel报错( TypeError)
经过一段时间折腾linux和python环境安装,开始初次学习python 代码如下: 报错如下: 代码与原代码完全一致,暂时没有找到原因
extjs4.0 报错TypeError: container is null
之前好好的今天突然报了这个错误 extjs 4.0 报错TypeError: container is null 这是什么原因?
百度地图定位的错误,求解答
[img=https://img-bbs.csdn.net/upload/201509/16/1442385466_330238.png][/img]rn不知道·什么愿意错误,新手求解答[img=https://img-bbs.csdn.net/upload/201509/16/1442385526_827493.png][/img]
java连接数据库错误,求解答
rn这个错误我改了好几天了,解决不了,希望各位有才之士帮帮忙rnrn错误:Exception in thread "main" java.lang.NoClassDefFoundError: javax/xml/bind/DatatypeConverterrnrn源代码:package Helloword;rnrnimport java.sql.Connection;rnimport java.sql.DriverManager;rnimport java.sql.SQLException;rnrnpublic class Text1 rn public static void main(String[] args) throws ClassNotFoundException, SQLException rn String driverName = "com.microsoft.sqlserver.jdbc.SQLServerDriver"; // 加载JDBC驱动rn String dbURL = "jdbc:sqlserver://localhost:1433; DatabaseName=student"; // 连接服务器rn String userName = "sa"; // 用户名rn String userPwd = "123456"; // 密码rn rn Class.forName(driverName);rn Connection connection = DriverManager.getConnection(dbURL, userName, userPwd);rn System.out.println(connection);rn rn rnrnrn
求高手解答错误
rn rn 贵美商城rn rn rn rn rn rn rn rn rn rn 手机充值-IP卡-电话卡rn 网游-点卡-金币-代练rn rn rn 移动rn 联通rn 魔兽rn 跑跑卡丁车rn rn rn rn rn
c++错误,求解答
Error 2 error LNK2005: "class std::vector > vIndex" (?vIndex@@3V?$vector@U_POS@@V?$allocator@U_POS@@@std@@@std@@A) already defined in Block.obj Function.obj HikParsern找不到到底错在哪里代码太多只粘最主要的部分吧rnrnvector vIndex;rnrntypedef struct _POSrnrn int iGroupRank;rn int iGroupOffset;rn int iBlockRank;rn int iFrameOffset;rnPOS;rn这是一个结构体向量,不知道到底错在了哪里
Uncaught TypeError: Object [object HTMLAnchorElement] has no method 'hasClass
[code=javascript]function CheckBox(parentId) rn this.parentId = parentId;rn this.value = 0;rn this.checkBox = $('');rnrn //初始化rn var that = this;rn (function init() rn that.checkBox.appendTo(that.parentId);rn rn that.checkBox.click(function () rn if (!this.hasClass('checkboxa_ban') && !this.hasClass('checkboxa_lose')) rn if (this.hasClass('checkboxa_nonce')) rn this.removeClass('checkboxa_nonce');rn else rn this.addClass('checkboxa_nonce');rn rn rn );rn )();rnrn[/code] rntips:rnUncaught TypeError: Object [object HTMLAnchorElement] has no method 'hasClass'rnrnwhy?
Extjs异常:Uncaught TypeError: Cannot read property 'internalId' of undefined
我在开发中碰到这样一个问题:rn一个tree,我后台给它传的json中包含id的话,在对树的一些应用到id的操作时就会碰到这样的异常:Uncaught TypeError: Cannot read property 'internalId' of undefined 。如果不传id就正常了,但是某些和id相关的操作就做不了,或者很麻烦。
相关热词 c++和c#哪个就业率高 c# 批量动态创建控件 c# 模块和程序集的区别 c# gmap 截图 c# 验证码图片生成类 c# 再次尝试 连接失败 c#开发编写规范 c# 压缩图片好麻烦 c#计算数组中的平均值 c#获取路由参数