Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/jquery/71.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript Href在IE8中不起作用_Javascript_Jquery_Ajax_Django_Internet Explorer - Fatal编程技术网

Javascript Href在IE8中不起作用

Javascript Href在IE8中不起作用,javascript,jquery,ajax,django,internet-explorer,Javascript,Jquery,Ajax,Django,Internet Explorer,我正在动态生成一个HTML,并将响应附加到一个DIV 以下是jQUery中生成的html {% elif topic|length < 1 or topic.user_exhausted_attempts %} $('.questionHolder').hide(); var html = '<section class="span9">'; html += '<div class="quiz-wrapper spa

我正在动态生成一个HTML,并将响应附加到一个DIV

以下是jQUery中生成的html

    {% elif topic|length < 1 or topic.user_exhausted_attempts %}
        $('.questionHolder').hide();
        var html = '<section class="span9">';
        html += '<div class="quiz-wrapper span12  questionHolder quiz-complete">';
        html += '<h2>Thank you for completing the Assessment.</h2>';
        html += '<br/><br/>';
        html += 'A unique learning plan has been created for you based on your responses to the Assessment.';
        html += '<br/><br/>';
        html += '<a href="{% url elearning.todolist %}" class="btn btn-primary roleplay-btn">Back to To Do</a>';
        //html += '<button onclick="javascript:window.document.location=\'{% url elearning.todolist %}\'" class="btn btn-primary roleplay-btn">Back to To Do</button>';
        {% if topic|length < 1 %}
            {% if show_submit %}
                html += '&nbsp;<button id="coursesubmit" onclick="resubmit()" class="btn btn-primary" style="margin: 5% auto;width:40%;">Submit</button>';
            {% endif %}
            {% endif %} 
        $(".responseHolder").html(html);
    {% endif %}

我想这可能是CSS的问题。与其他浏览器一样,它工作正常,这意味着没有语法错误。 在IE8中,可能有其他元素填充、边距影响或覆盖“待办事项”按钮。您可以在IE8开发工具中查看它


此外,您还可以使用IE9或IE10进行交叉验证(Microsoft在高级版本中解决了大多数浏览器错误),如果这些浏览器中的代码工作正常,那么肯定存在CSS问题。

我回答这个问题可能太迟了,您可能已经解决了问题。然而

我想问题是当你使用“section”在ie8中不起作用,但是在ie9+中,你必须要么修改代码,要么你可以更新r.js,其中包括让ie8理解这个标签的hack


下载js并包含在html中。这应该可以解决这个问题

请向我们展示呈现的html,而不是上面的。检查更新的问题该链接没有问题。你有任何脚本在页面上运行吗?其他原因导致了您的问题。请澄清一下,显示此HTML的页面的URL是什么?它与
HREF
属性中的URL不同,是吗?URL是
<section class="span9">
    <div class="quiz-wrapper span12  questionHolder quiz-complete">
        <h2>Thank you for completing the Assessment.</h2>
        <br/>
        <br/>
        A unique learning plan has been created for you based on your responses to
        the Assessment.<br/>
        <br/>
        <a href="/eLearning/todo-list/" class="btn btn-primary roleplay-btn">Back to To Do</a>