<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Document</title>
</head>
<body>
<h1>测试在指定位置插入内容并改变光标位置</h1>
<textarea
name=""
id="myTextarea"
cols="30"
rows="10"
placeholder="请输入内容"
></textarea>
<button>https://</button>
<button>http://</button>
<button>www.</button>
<button>.com</button>
<button>.cn</button>
<script>
let mytest &
在多行文本输入框光标指定位置插入内容并改变光标位置
最新推荐文章于 2022-12-06 16:04:45 发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)