草庐IT

is_object

全部标签

javascript - Angular 2 RC 4 "(SystemJS) Can' t 解析 [object Location] : "in IE 11 的所有参数

我的Web应用程序在Chrome、Firefox和Edge中运行良好,但在IE11中当然不行。可能也不是旧版本的IE。它是一个使用AngularCli生成应用程序的最小应用程序。完整错误:EXCEPTION:Can'tresolveallparametersfor[objectLocation]:(?).EXCEPTION:Can'tresolveallparametersfor[objectLocation]:(?).UnhandledPromiserejection:(SystemJS)Can'tresolveallparametersfor[objectLocation]:(?)

javascript - react 函数说 "is not a function"

我正在努力将一个小React应用程序分解成更小的组件。在分离代码之前,一切都按计划进行。我现在正在尝试调用一个函数onChange,它调用一个函数,然后调用一个函数作为prop。我像这样绑定(bind)函数this.updateInput=this.updateInput.bind(this);但我仍然无法弄清楚我缺少什么。我在这里(React:Passfunctiontochildcomponent)上尝试了最近的一篇文章,但错误仍然存​​在。任何帮助都很棒。这是我正在使用的代码:classWeatherextendsReact.Component{constructor(props

javascript - 为什么 ES5 Object 方法没有添加到 Object.prototype 中?

ES5添加了一个number的methods到Object,这似乎打破了JavaScript的语义一致性。例如,在此扩展之前,JavaScriptAPI始终围绕操作对象本身;vararrayLength=[].length;varfirstPosInString="foo".indexOf("o");...新的Object方法是这样的;varobj={};Object.defineProperty(obj,{value:'a',writable:false});...当以下内容更加符合时:varobj={};obj.defineProperty({value:'a',writable:

javascript - 类型错误 : 'undefined' is not a function (evaluating '$( "#wnd_Addparam"). 对话框')

我有2个月的这个例子,我换了PC。现在这似乎不再起作用了。这是一个应该通过(之前)按下按钮来加载小窗口对话框的示例。但是,它不起作用...这是我的代码://varregex,v,l,c,b;$("#wnd_Addparam").dialog({autoOpen:false,height:'auto',width:350,modal:true,resizable:false,buttons:{"Add":function(){$(this).dialog("close");},Cancel:function(){$(this).dialog("close");}},close:funct

javascript - 脚本错误 : Unable to modify the parent container element before the child element is closed

脚本错误:在关闭子元素之前无法修改父容器元素。我应该怎么办?我单击"is",但未显示我的网页。在我的产品页面代码的开头,我有:http://pastebin.com/iiUfMq1v除IE8外,所有浏览器都运行良好,IE8是唯一会抛出任何类型错误的浏览器。有什么想法吗? 最佳答案 请检查这些链接http://answers.microsoft.com/en-us/ie/forum/ie8-windows_other/html-parsing-error-unable-to-modify-the-parent/e64759e0-d34

javascript - is (':first' ) 返回不同的(错误的?)结果应该是相同的元素。 jsFiddle里面

http://jsfiddle.net/garnwraly/sfrwU/2/仅给定HTMLclick和这个脚本$('body').on('click','button',function(e){//console.log(e.currentTarget==$('button')[0]);//true;//console.log($('li').is('li:first'));//trueconsole.log($(e.currentTarget).parent().is('li:first'))//falseconsole.log($('button').parent().is('li

javascript - "TypeError: ' 未定义 ' is not a function"尝试使用 jQuery UI 时

我正在尝试使用slider()jQueryUI的功能,并不断在控制台中收到以下错误:类型错误:undefined不是函数(计算jQuery('#slider').slider())我确实已正确链接到jQueryUIjavascript和CSS文件-当我查看页面源代码时,它们都在那里。为什么我仍然收到此错误?如果有用的话,我正在使用Rails和一些Bootstrap东西。这是JavaScript代码:$(document).ready(function(){$('#slider').slider();});谢谢这是:NewCompany-OEFortbyOxfordEntrepreneu

javascript - Firefox -- 仅当从 Web Worker 调用时为 "FileReader is not defined"

在Firefox中,以下代码在主浏览器线程中正常运行时可以正常工作--varfr=newFileReader();..但是当从webworker运行时,会抛出以下错误:FileReaderisnotdefined相同的代码在Chrome和Safari中运行良好。对于在Firefox的网络worker中支持FileReader有什么建议吗? 最佳答案 正如adeneo所指出的,WebWorkers中的Firefox似乎根本不支持FileReader。我能够使用FileReaderSync来完成我需要的。

javascript - 传单未捕获错误 : Invalid LatLng object: (NaN, NaN)

我正在尝试使用传单动态加载map标记,但出现此错误:UncaughtError:InvalidLatLngobject:(NaN,NaN)我正在使用这个javascript加载我的标记:varlat;varlng;for(i=0;i我正在阅读的json是这样的:[{"brewery":"21stAmendmentBrewery","lat":"37.7824175","lng":"-122.3925921","breweryID":"EdRcIs"},{"brewery":"AbitaBrewingCompany","lat":"30.482408","lng":"-90.056605

javascript - promise : is . done() 总是执行,即使 .catch() 是?

我的Promise问题我是Promises的新手,我一直在阅读QDocumentation,它说:Whenyougettotheendofachainofpromises,youshouldeitherreturnthelastpromiseorendthechain.我在我的代码中以Q.Promise方式定义了一个Promise,使用以下console.log来注销执行跟踪:functionfoo(){returnQ.Promise(function(resolve,reject){doSomething().then(function(){console.log('1');retu