如何延迟文字?我一直在使用setTimeout()
但是没有用。
<form name="myForm">
<input type="submit" value="confirm" onclick="submitFunction()"/>
</form>
<script>
function submitFunction(){
document.getElementById("demo").innerHTML = "Hi How are you?";
}
</script>
<div id="demo"></div>
答案 0 :(得分:1)
在这种情况下,根本不要使用class QuotePost < Post
def initialize(site, base, title)
# Nooo, I don't want to create a .md file for this
name = "2016-05-13-test.md"
dir = ""
# (write out .md file here)
super(site, base, dir, name)
end
end
。它将导致页面重新加载,并且您的预期行为永远不会显示。将输入类型更改为<input type="submit"/>
不会触发帖子行为,因此您的消息如下所示:
button