catch ret in type ans area

This commit is contained in:
Damien Elmes 2011-04-22 07:22:10 +09:00
parent 6f8a3c5216
commit 0b95bab30b

View file

@ -155,6 +155,11 @@ function _onSpace() {
py.link(document.activeElement.href);
}
}
function _typeAnsPress() {
if (window.event.keyCode === 13) {
_showans();
}
}
$(document).ready(function () {
$(".ansbut").focus();
});
@ -388,7 +393,8 @@ div#filler {
return ""
return """
<center>
<input type=text id=typeans style="font-family: '%s'; font-size: %s;">
<input type=text id=typeans onkeypress="_typeAnsPress();"
style="font-family: '%s'; font-size: %s;">
</center>
""" % (
self.getFont())