效果如下,点击后下方出现一行字。
做法:
1.navigator app project
2.homepage.html中输入:
<button onClick="click">Click me!</button>
<p id="myText" />
3.homepage.js中输入:
document.addEventListener("click", function () {
myText.innerText = "Hello Windows Metro style apps with JavaScript!";
});