相关疑难解决方法(0)

成员未找到IE错误(IE 6,7,8,9)

现在让我首先向任何IE用户指出(这不是Chrome,Safari或Firefox中的问题)提示提示;)

所以...我在IE中的工具提示存在问题,我有一个onmouseover监听器,用于所有可以恢复的元素,然后在我的鼠标悬停功能中,我有一个非常基本的跨浏览器声明...

var event = e || window.event,
    el = event.target || event.srcElement;
Run Code Online (Sandbox Code Playgroud)

我一直遇到IE浏览器中不存在的窗口对象的问题,这是一个问题,我添加了一个标志来忽略鼠标悬停从一个元素鼠标悬停到工具提示本身的路上(在允许的时间周期内,300毫秒) .换句话说,该标志是忽略从原始鼠标悬停到工具提示的路径上的鼠标悬停.

所以逻辑看起来像这样......

loadtip.refMouseOver = function (e) {

    var event = e || window.event, el = event.target || event.srcElement;
    //console.log(window); // <-- throws error in IE (Member not found)
    // Reset the lastHoveredRef data.
    tipManager.lastHoveredRef = null;
    tipManager.lastHoveredRef = [el, event];

    // true means there is a tip open still, so if no tip is open.
    if (tipManager.tipState !== true) { 
        tipManager.processTip(el, event);
    } else {        
        return; …
Run Code Online (Sandbox Code Playgroud)

internet-explorer javascript-events

26
推荐指数
1
解决办法
1万
查看次数

在IE中返回"未知"的类型

我有一个窗口,在关闭之前我刷新底层页面.

if(opener && typeof(opener.Refresh) != 'undefined')
{
    opener.Refresh();
}
Run Code Online (Sandbox Code Playgroud)

如果我离开原始的开始页面,此代码将抛出"权限被拒绝"错误.

调试代码显示typeof(opener.Refresh)等于"未知"而不是预期的"未定义".

据我所知,"未知"不是其中一个返回值typeof,那么该值的返回方式和原因是什么?

更多的信息

我通过将检查更改为以下来避免错误:

if(opener && typeof(opener.Refresh) == 'function')
Run Code Online (Sandbox Code Playgroud)

但是这样的例子(在javascript中检测未定义的对象属性)似乎并未将"未知"因素纳入等式中.

javascript internet-explorer typeof

22
推荐指数
3
解决办法
1万
查看次数

jQuery Validation插件,IE7"SCRIPT3:未找到成员"

我有以下内容:

<html>
    <head>
    </head>
    <body>
        <div>
            <form method="post">
                <div id="questions">    
                    <label for="question-6">Name of Course:</label>
                    <input type="text" name="name_of_course[response]" value="" id="question-6" class="required">
                    <label class="control-label" for="reporting-year">Reporting Year: </label>
                    <select name="reporting_year" id="reporting-year">
                        <option value="-1" selected="selected">Select option...</option>
                        <option value="4">2013-2014</option>
                        <option value="1">2012-2013</option>
                        <option value="2">2011-2012</option>
                        <option value="3">2010-2011</option>
                    </select>
                </div>
                <input type="submit" name="submit" value="Save Entry" class="btn">
            </form>
        </div>
        <script src="//code.jquery.com/jquery.js"></script>
        <script src="//ajax.aspnetcdn.com/ajax/jquery.validate/1.10.0/jquery.validate.min.js"></script>
        <script>
            $(function(){
                jQuery.validator.addMethod("notEqual", function(value, element, param) {
                        return this.optional(element) || value !== param;
                        }, "Please select an option");
                $('form').validate({
                    rules:{
                        'reporting_year': {
                            notEqual: "-1"
                        }
                    } …
Run Code Online (Sandbox Code Playgroud)

javascript jquery jquery-validate internet-explorer-7 compatibility-mode

15
推荐指数
2
解决办法
2万
查看次数

无法解决jquery IE 7/8脚本3成员未找到错误

我的网络应用程序在这里运行:URL 我使用jquery版本1.7.1.min.js即浏览器,我收到IE 7和8的以下错误.

错误详情:

SCRIPT3: Member not found.

jquery-1.7.0.min.js, line 2 character 30982
Run Code Online (Sandbox Code Playgroud)

我也发现它e.nodeValue是null,你可以在附图中看到.在此输入图像描述.但是,相同的代码适用于IE 9和10.

在浏览代码时,我发现以下代码不能运行ie6/7.任何帮助如何摆脱这个错误?

/ IE6/7 do not support getting/setting some attributes with get/setAttribute
if ( !getSetAttribute ) {

    fixSpecified = {
        name: true,
        id: true
    };

    // Use this for any attribute in IE6/7
    // This fixes almost every IE6/7 issue
    nodeHook = jQuery.valHooks.button = {
        get: function( elem, name ) {
            var ret;
            ret = elem.getAttributeNode( name );
            return ret && ( …
Run Code Online (Sandbox Code Playgroud)

jquery jquery-mobile

7
推荐指数
1
解决办法
2641
查看次数