简体   繁体   English

Href在IE8中不起作用

[英]Href is not working in IE8

I am generating an HTML dynamically and appending the response to A DIV . 我正在动态生成HTML,并将响应附加到A DIV。

Here is the generated html in jQUery 这是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 %}

But when I am clicking on the Back to TODO button in IE8 the button is unresponsive . 但是,当我单击IE8中的Back to TODO按钮时,该按钮无响应。

Above code is working fine in chrome and firefox . 上面的代码在chrome和firefox中工作正常。

Please tell me what do so that it could start working 请告诉我该怎么做才能开始工作

<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>

I think it might be CSS issue. 我认为这可能是CSS问题。 As in other browsers it working fine, That means there is no syntax error there. 与在其他浏览器中一样,它可以正常工作,这意味着那里没有语法错误。 In IE8 may be other elements padding, margin affecting or overriding 'To do' button. 在IE8中,其他元素可能是填充,边距影响或替代“待办事项”按钮。 You can check it in IE8 development tool. 您可以在IE8开发工具中进行检查。

Also you can cross verify with IE9 or IE10 (Microsoft resolved most of the browser errors in advance versions), If code is working fine in these browsers then there is definitely a CSS issue. 另外,您还可以与IE9或IE10进行交叉验证(Microsoft解决了早期版本中的大多数浏览器错误)。如果这些浏览器中的代码运行正常,则肯定存在CSS问题。

I might be too late in answering this, and you would have got your problem sorted. 我回答这个问题可能为时已晚,您将可以解决您的问题。 nevertheless 但是

I guess the problem is when u use "section" does not work in ie8 but ie9+, you have to either change the code or else you can you modernizr.js which includes the hack to get ie8 to understand this tag. 我想问题是当您在ie8中不能使用“ section”但在ie9 +中无法使用时,您必须更改代码,否则您可以使用modernizr.js,其中包括用于获取ie8的hack来理解此标记。

download the js and include in you html. 下载js并包含在您的html中。 this should sort out this issue 这应该解决这个问题

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM