草庐IT

is_undefined

全部标签

javascript - knockout 类型错误 : m. apply is not a function

下面是带有折叠面板的表格的代码。click事件处理程序抛出“m.apply不是函数”的错误消息。Quux.CollapseExpandCustom.ToggleSection('+id+')是接受动态id的函数。请让我知道我犯了什么错误。我需要绑定(bind)代码中提到的click事件。UserStartedDateFooActionFoos       最佳答案 这个答案可能有帮助:Knockoutclickbindingstrangebehavior基本上,如果你将它包

javascript - 单个文件组件 vue js 上的属性 this.$el undefined

我正在尝试使用laravelmix和vuejs创建一个全局组件,但是在访问属性this.$el时它是未定义的。这是我的组件文件:日期选择器.vueexportdefault{props:['myclass','name','placeholder','value'],data(){return{}},created(){console.log("this.$el",this.$el);//undefinedconsole.log("this",this);//$elisdefinedvarvm=this;varoptions={"locale":"es","onChange":func

javascript - undefined 不是函数(计算 '_this._registerEvents()' )

在我删除我的src文件夹以重构此错误后。我相信这是一个缓存问题?我试着按照这个gist但没有运气。"react":"16.4.1","react-native":"0.56.1","@babel/core":"^7.1.2","presets":["react-native"]`importReact,{Component}from'react';import{Platform,Text,View}from'react-native';import{Provider}from'react-redux';import{store}from'./src/redux/store';expor

javascript - 无法获取属性值 ____ : object is null or undefined

我已经研究过了。Stackoverflow上已经有几篇关于此的帖子,但似乎都没有给我答案。与此处的其他帖子一样,它在Chrome或Firefox中运行良好。但是在IE9、8、7和6中我得到了同样的错误。我已经尝试过强制9进入兼容模式的hack,但它没有解决问题。这是说无法获取属性“styleHelper”的值:对象为空或未定义,具有讽刺意味的是,如果我在IE9中输入控制台window.microstrategy.bone("W2552_Ctl").styleHelper它可以工作并返回我需要的函数(该ID是由WYSIWYG创建的,不要讨厌我)。是的,所有内容都包含在$(document

javascript - 类型错误 : 'undefined' is not a function with Tablesorter only in Safari

只有在safari中我才会收到错误:TypeError:undefinedisnotafunction(evaluating'$("table").tablesorter')在所有其他浏览器中它都有效。这是我的javascript代码,我在标题中放入了jquery脚本和tablesorterjavascript。那么我该如何解决这个问题呢?为什么它只在Safari而不是在任何其他浏览器中?$(function(){//callthetablesorterplugin$("table").tablesorter({theme:'jui',headerTemplate:'{content}

javascript - 错误 : Expression 'undefined' used with directive is non-assignable

在这里摆弄http://jsfiddle.net/prantikv/dJty6/36/我有这样的json数据$scope.info={"company1":"this","company2":"is","company3":"sparta"}我正在使用ng-repeat打印所有数据,我想监控字段的变化。我有一个像这样的monitorChange指令:.directive('monitorChange',function(){return{restrict:'A',scope:{changedFlag:'='},link:function(scope,element,attrs){var

javascript - 类型错误 : $timeout is not a function

这里发生了什么:我希望“取消预订”按钮在单击后超时。第一次单击时,它会更改为显示“确认取消”按钮。几秒钟后返回“取消预订”。我的控制台给我:TypeError:$timeoutisnotafunction我正在使用AngularJS$timeout:Controller:'usestrict';module.controller('ReservationItemCtrl',['$scope','$stateParams','$RPC',function($scope,$stateParams,$RPC,$timeout){......otherstuff.............oth

javascript - 带有 JSONP 的 AJAX 返回错误 Callback is Undefined

这是我的ajax调用。我知道header是正确的,因为当我直接访问url时,它会给我这样的信息:jsonpCallback({"id":"274"})但是当我进行ajax调用时-它说UncaughtReferenceError:jsonpCallbackisnotdefined$.ajax({url:'http://localhost:9000/product/rest/company?'+$('form').serialize(),type:'GET',crossDomain:true,//enablethisdataType:'jsonp',jsonpCallback:'callb

javascript - Gulp TypeError : dest. on is not a function

我正在尝试使用Gulp任务生成bundle.js文件vargulp=require('gulp'),gutil=require('gulp-util'),wrench=require('wrench'),conf=require('./webpack.config'),webpack=require('webpack'),WebpackDevServer=require('webpack-dev-server');//Webpackgulp.task('wp',function(){returngulp.src('./assets/scripts/entry.js').pipe(web

javascript - JavaScript 中的 undefined 和 window.undefined 有什么区别?

如果a未定义,这有效:if(window.a){}虽然这会引发错误:if(a)谁能解释一下为什么? 最佳答案 window.a是window的一个属性,它是undefined。a是一个变量,它未声明。要使用变量,您应该首先使用var语句声明它。由于您没有声明a,因此解释器会引发错误。对象属性无需显式声明即可使用。Crockford在TheGoodParts中写道:Ifyouattempttoextractavaluefromanobject,andiftheobjectdoesnothaveamemberwiththatname,i