javascript 冲突

来源:百度知道 编辑:UC知道 时间:2024/06/07 16:17:08
try {
if (/^("(\\.|[^"\\\n\r])*?"|[,:{}\[\]0-9.\-+Eaeflnr-u \n\r\t])+?$/.
test(this)) {

// In the second stage we use the eval function to compile the text into a
// JavaScript structure. The '{' operator is subject to a syntactic ambiguity
// in JavaScript: it can begin a block or an object literal. We wrap the text
// in parens to eliminate the ambiguity.

var j = eval('(' + this + ')');

// In the optional third stage, we recursively walk the new structure, passing
// each name/value pair to a filter function for possible transformation.

if (typeof filter === 'function') {

function walk(k

Browser.Engine.presto 应该判断浏览器是否 opera 的语句吧。

你的 Browser 对象是从哪儿来的? 或者说是用了什么框架 ?

你可以改成
Browser.Engine && Browser.Engine.presto 试试看。

应该也用mootools了吧.这东西好用得很.但是你贴的代码里看不出什么原因.

mootools有个内建对象Brower,用于检查当前浏览器,系统等编程环境。

Browser.Feature.xpth << (boolean) 如果浏览器支持使用XPath的DOM查询,返回为真
Browser.Feature.xhr << (boolean) 如果浏览器支持XMLHTTP对象时为真
Browser.Engine.trident << (boolean) 如果浏览器使用trident引擎时为真(IE)
Browser.Engine.gecko << (boolean) 如果浏览器使用gecko引擎时为真(Firefox,Mozilla)
Browser.Engine.webkit << (boolean) 如果浏览器使用webkit引擎时为真(Safari, Google Chrome, Konqueror)
Browser.Engine.presto << (boolean) 如果浏览器使用presto引擎时为真(Opera 9)

Hi