我正在动态生成 HTML 并将响应附加到 A 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 += ' <button id="coursesubmit" onclick="resubmit()" class="btn btn-primary" style="margin: 5% auto;width:40%;">Submit</button>';
{% endif %}
{% endif %}
$(".responseHolder").html(html);
{% endif %}
但是当我点击Back to TODO
IE8 中的按钮时,按钮没有响应。
上面的代码在 chrome 和 firefox 中运行良好。
请告诉我该怎么做才能开始工作
<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>