我正在jsfiddle上尝试它......我不知道它为什么不运行............有人帮助
html section
<html>
<body>
<div>The Answer is: </div>
<div class='answer'></div>
</body>`enter code here`
</html>
js section
function writeAnswer(answer) { // helper function for output
$('div.answer').append($('<div>').text(answer));
}
function writedemo() {
var answer="hello";
writeAnswer(answer);
}
}
writedemo();