草庐IT

is_any_of

全部标签

JavaScript 错误 : "ReferenceError: array is not defined"

我想制作一个JavaScriptarray并通过post请求将其传递到php中的另一个页面我在firebug中遇到错误:ReferenceError:arrayisnotdefined代码如下:$(document).ready(function(){vardata=newarray();//thislinethrowstheerror//HandleSubmitingformdata$("#btnSumbit").click(function(){$('#tblCriteriainput[type=text]').each(function(){data[this.id]=this.

javascript - 猫头鹰旋转木马 : Run function when last slide is reached

我正在尝试在到达轮播的最后一张幻灯片时运行一个函数。我已经设法使用afterInit和afterMove回调来循环轮播项目,但我只需要能够在循环结束时运行一个函数。希望你能帮到你。插件:http://owlgraphic.com/owlcarousel/#customizingslideshow.owlCarousel({navigation:false,//ShownextandprevbuttonsslideSpeed:300,paginationSpeed:400,singleItem:true,autoPlay:false,stopOnHover:false,afterInit

javascript - Angular .js : directive object in scope is always undefined

编辑:fork了@EliteOctagon的plunker,奇怪的是它在工作!无法理解为什么下面的代码不是。http://plnkr.co/edit/y8uvulA9RHQ1Y9mwzin1EDIT2:fork了之前的plunker并向Controller的逻辑添加了$timeout,它停止工作了!猜猜这真的是加载顺序。查看:http://plnkr.co/edit/ivmGQmEHTatNzBWhppyf我是Angular的新手,无法理解指令隔离范围。我需要创建一个指令来打印出在我的页面中,包含关于ViewController中的对象的信息。我试图做的是隔离指令范围并通过具有双向绑定

javascript - 用 jQuery 实现 "this is taking too long"消息

如何实现类似gmail的“这花费的时间太长了”warningmessage使用jQueryAjaxAPI?对于那些从未在gmail上看到此消息的人,当“登录”过程完成时间过长时会出现此消息,然后建议一些解决方案。我在我的网站上使用jQueryAjax,我想在页面加载速度非常慢时警告用户,然后提出一些解决方案建议(例如,刷新页面或帮助页面的链接)。 最佳答案 我建议像这样简单的安排:functiontooLong(){//Whatshouldwedowhensomething'stakingtoolong?Perhapsshowa``

javascript - 未捕获的类型错误 : Cannot read property 'safari' of undefined

我有这个jjavascript来调整iframe的大小:$(function(){variFrames=$('iframe');functioniResize(){for(vari=0,j=iFrames.length;i在chrome中,这里有问题:if($.browser.safari||$.browser.opera){我收到这个错误有什么原因吗?我使用的是最新的JQuery?谢谢 最佳答案 您可能正在使用jQuery1.9或更高版本,在这种情况下$.browser自1.3起被弃用后被正式删除。您可以使用jQuerymigra

javascript - UnderscoreJS 未捕获类型错误 : Cannot call method 'replace' of undefined

在我的BackboneView中我有:noteTemplate:_.template($('#note-template').html()),这是抛出这个错误。模板是:Created3daysagoIn3hours我很困惑,因为这在我的控制台中有效:>>_.template($('#note-template').html());函数(n){returne.call(this,n,w)}完整代码如下:App.Views.Index=Backbone.View.extend({el:$("div.reminders"),todays:$("span.today"),tomorrows:$

JavaScript 运行时错误 : '$' is undefined

有人可以帮助解决我代码中的这个错误吗?当我在InternetExplorer中启动网站时出现此错误:JavaScriptruntimeerror:'$'isundefined这是代码,请帮助我在java脚本中需要更改什么?div.world_map_container#transparent_map{border:mediumnone;height:auto;position:absolute;width:auto;z-index:30;}ulli{display:none;position:absolute;text-indent:-9999px;z-index:20;}#home_

javascript - Uncaught ReferenceError : function is not defined jQuery

我试图在单击按钮时调用jQuery函数。但是我收到如下错误:未捕获的ReferenceError:未定义update_question_ajaxHTML:button"onclick="update_question_ajax()"style="outline:0none;">jQuery:$(function(){functionupdate_question_ajax(id){vartest=$('.edit-question-'+id+'input[name="translated"]');vareditedQuestionId=$('#question-id-'+id).val

javascript - D3 饼图 : Uncaught Type Error - Cannot read property 'pie' of undefined

我正在尝试基于此resource创建一个d3饼图.但是,我收到以下错误:UncaughtTypeError-Cannotreadproperty'pie'ofundefined我的代码:classPieChartextendsReact.Component{constructor(){super();//-Thisiswheretheerrorisoccuring!this.pie=d3.layout.pie().value((d)=>d.value);this.colors=d3.scale.category10();}arcGenerator(d,i){return();}rend

javascript - 尝试使用 React Hooks 时出现 "TypeError: Object(...) is not a function"错误(alpha)

这个问题在这里已经有了答案:HowtousenewFeatureHooksinReact?(1个回答)关闭4年前。当我尝试使用新的Reacthooks功能时,出于某种原因我遇到了这个烦人的错误消息。我按照文档中的说明使用yarnaddreact@next将React升级到最新的alpha版本。