javascript - undefined is not a function js报错
大家讲道理
大家讲道理 2017-04-10 15:18:58
0
4
922

/* Zepto 1.1.3 - zepto event ajax form ie detect fx assets data deferred callbacks selector touch gesture stack - zeptojs.com/license */

var Zepto = (function() {
var undefined, key, $, classList, emptyArray = [], slice = emptyArray.slice, filter = emptyArray.filter,
document = window.document,
elementDisplay = {}, classCache = {},
cssNumber = { 'column-count': 1, 'columns': 1, 'font-weight': 1, 'line-height': 1,'opacity': 1, 'z-index': 1, 'zoom': 1 },
fragmentRE = /^\s<(\w+|!)[^>]>/,
singleTagRE = /^<(\w+)\s\/?>(?:<\/\1>|)$/,
tagExpanderRE = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]
)\/>/ig,
rootNodeRE = /^(?:body|html)$/i,
capitalRE = /([A-Z])/g,

// special attributes that should be get/set via method calls methodAttributes = ['val', 'css', 'html', 'text', 'data', 'width', 'height', 'offset'], adjacencyOperators = [ 'after', 'prepend', 'before', 'append' ], table = document.createElement('table'), tableRow = document.createElement('tr'), containers = { 'tr': document.createElement('tbody'), 'tbody': table, 'thead': table, 'tfoot': table, 'td': tableRow, 'th': tableRow, '*': document.createElement('p') }, readyRE = /complete|loaded|interactive/, simpleSelectorRE = /^[\w-]*$/, class2type = {}, toString = class2type.toString, zepto = {}, camelize, uniq, tempParent = document.createElement('p'), propMap = { 'tabindex': 'tabIndex', 'readonly': 'readOnly', 'for': 'htmlFor', 'class': 'className', 'maxlength': 'maxLength', 'cellspacing': 'cellSpacing', 'cellpadding': 'cellPadding', 'rowspan': 'rowSpan', 'colspan': 'colSpan', 'usemap': 'useMap', 'frameborder': 'frameBorder', 'contenteditable': 'contentEditable' }, isArray = Array.isArray || function(object){ return object instanceof Array }

zepto.matches = function(element, selector) {
if (!selector || !element || element.nodeType !== 1) return false
var matchesSelector = element.webkitMatchesSelector || element.mozMatchesSelector ||
element.oMatchesSelector || element.matchesSelector
if (matchesSelector) return matchesSelector.call(element, selector)
// fall back to performing a selector:
var match, parent = element.parentNode, temp = !parent
if (temp) (parent = tempParent).appendChild(element)
match = ~zepto.qsa(parent, selector).indexOf(element)
temp && tempParent.removeChild(element)
return match
}

两个zepto都这样定义会不会冲突?

/* Zepto 1.0 - polyfill zepto detect event ajax form fx fx_methods data assets selector touch - zeptojs.com/license */

var Zepto = function() {
function E(a) {
return a == null ? String(a) : y[z.call(a)] || "object"
}
function F(a) {
return E(a) == "function"
}
function G(a) {
return a != null && a == a.window
}
function H(a) {
return a != null && a.nodeType == a.DOCUMENT_NODE
}
function I(a) {
return E(a) == "object"
}
function J(a) {
return I(a) && !G(a) && a.proto== Object.prototype
}
function K(a) {
return a instanceof Array
}
function L(a) {
return typeof a.length == "number"
}
function M(a) {
return g.call(a,
function(a) {
return a != null
})
}
function N(a) {
return a.length > 0 ? c.fn.concat.apply([], a) : a
}
function O(a) {
return a.replace(/::/g, "/").replace(/([A-Z]+)([A-Z][a-z])/g, "$1_$2").replace(/([a-z\d])([A-Z])/g, "$1_$2").replace(/_/g, "-").toLowerCase()
}

大家讲道理
大家讲道理

光阴似箭催人老,日月如移越少年。

모든 응답 (4)
PHPzhong

就是告诉你调用的function没有定义,打开控制台看是哪个function就知道了

    迷茫


    打开控制台,错误信息明显告诉哪行出问题了!点击进去

      迷茫

      类型错误,不是一个函数,index.js第38行

        迷茫

        点击事件错误

          최신 다운로드
          더>
          웹 효과
          웹사이트 소스 코드
          웹사이트 자료
          프론트엔드 템플릿
          회사 소개 부인 성명 Sitemap
          PHP 중국어 웹사이트:공공복지 온라인 PHP 교육,PHP 학습자의 빠른 성장을 도와주세요!