Skip to content

Instantly share code, notes, and snippets.

@yetone
Last active August 29, 2015 14:07
Show Gist options
  • Save yetone/bc3cc5e420f62ecbbee8 to your computer and use it in GitHub Desktop.
Save yetone/bc3cc5e420f62ecbbee8 to your computer and use it in GitHub Desktop.
嵌入 HTML

只是测试嵌入 HTML 而已。顺便探索一下 GitHub Gists 的可能性。

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>测试专用</title>
<link href="//maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css" rel="stylesheet">
<style>
#main {
color: #555;
}
#area {
padding: 10px 0;
}
</style>
<script>
var acc = [
'我要好好学习报效祖国!',
'好无聊',
'干嘛点我',
'呜呜呜,好害羞',
'你再点我我就把你吃掉!',
'我们的祖国像花园',
'你可知逗逼,不我真姓',
'啊啊啊~~~那就是娘',
'花园里的花朵儿真鲜艳'
];
window.onload = function() {
btn.addEventListener('click', function() {
area.innerHTML = acc[Math.random() * acc.length | 0];
});
};
</script>
</head>
<body>
<div id="main">
<div id="area">大家好,我是一段 HTML</div>
<input id="btn" class="btn btn-default" type="button" value="点我点我"></input>
</div>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment