2023-08-30T10:06:12.png

<!DOCTYPE html>
<html lang="zh">
<head>
 <meta charset="UTF-8">
 <title>两个输入框</title>
 <meta name="viewport" content="width=device-width, initial-scale=1">
 <link rel="stylesheet" href="https://cdn.bootcss.com/sweetalert/1.1.3/sweetalert.min.css"/>
<style> 
.v {
  position: fixed;
  bottom: 5px;
  right: 50%;
  z-index: 150;
  border: none;
  outline: none;
  color: white;
  cursor: pointer;
  padding: 5px;
  border-radius: 10px;
  font-weight:bold;
  text-align:center;
  background-color:Black;
  opacity: 0.70;
  font-size: 0.7rem;
}

.w{
  position: fixed;
  bottom: 5px;
  right: 1%;
  z-index: 150;
  border: none;
  outline: none;
  color: white;
  cursor: pointer;
  padding: 5px;
  border-radius: 10px;
  font-weight:bold;
  text-align:center;
  background-color:Black;
  opacity: 0.70;
  font-size: 0.7rem;
}

button:hover {
  background-color:red;
  
}
    
textarea{BORDER-RIGHT: transparent 1px solid; BORDER-BOTTOM: transparent 1px solid; FONT-FAMILY: "微软雅黑", "Verdana", "Arial", "Helvetica"; TEXT-ALIGN: LIFT;
     height:calc(100vh);
     width:48%;
      margin-left:1%;
      font-weight:bold;
      font-size:1em;
    }
</style>

</head>
<body>
<script type="text/javascript">
function copyUrl2()
{
 var Url2=document.getElementById("biao1");
 Url2.select(); // 选择对象
  document.execCommand("Copy"); // 执行浏览器复制命令
  alert("已复制,可按esc键关闭该提示");
  }
 </script>

<script type="text/javascript">
function copyUrl2()
{
 var Url2=document.getElementById("biao2");
 Url2.select(); // 选择对象
  document.execCommand("Copy"); // 执行浏览器复制命令
  alert("已复制,可按回车键关闭该提示");
  }
 </script>
 
<button type="button" class="v" onClick="copyUrl2()" >复制</button> 

<button type="button"  class="w"     onClick="copyUrl2()" >复制</button> 

<textarea cols="20" rows="10"  class="q"  id="biao1"></textarea>

<textarea cols="20" rows="10" class="s"  id="biao2"></textarea>

</body>