使用事件处理程序而不是内联代码
$(function (){
var parent = $("#hello"); //Get the element that will hold all the links.
for(var i=0;i<80;i++){
parent.append("link"+i+"");
//Append a link with the URL in its href attribute
}
parent.on("click", "a", function(e) { //Select links under the #hello element and provide a click handler
site.exec('page', 'openInternal', {
'url': this.href //Use the href property of the link
});
e.preventDefault(); //Don't follow the href link
});
}