4 Star 36 Fork 36

编写美好前程 / chatgpt-vue

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
index.html 769 Bytes
一键复制 编辑 原始数据 按行查看 历史
chaining 提交于 2023-02-16 12:49 . chatgpt
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>666</title>
<style type="text/css">
.div1{
width: 500px;
height: 300px;
overflow-y: scroll;
margin: auto;
border: 1px solid red;
}
.div2{
width: 200px;
height: 50px;
border: 1px solid red;
}
</style>
</head>
<body>
<div class="div1">
666
</div>
<button type="button" id="btn">添加</button>
<script type="text/javascript">
var div1 = document.querySelector('.div1');
var btn = document.querySelector('#btn');
btn.addEventListener('click',function(){
console.log('66')
var k = div1.innerHTML;
div1.innerHTML = k+"<br/>66";
div1.scrollTop = div1.scrollHeight;
})
</script>
</body>
</html>
JavaScript
1
https://gitee.com/zccbbg/chatgpt-vue.git
git@gitee.com:zccbbg/chatgpt-vue.git
zccbbg
chatgpt-vue
chatgpt-vue
master

搜索帮助