Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/html/84.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript 如何仅在pdf中打印我的文本区域而不是整个页面 text任何图像 复制歌词函数copyhtml(){const text=document.querySelector(“#htmlText”);const btnText=document.querySel_Javascript_Html_Printing_Textarea - Fatal编程技术网

Javascript 如何仅在pdf中打印我的文本区域而不是整个页面 text任何图像 复制歌词函数copyhtml(){const text=document.querySelector(“#htmlText”);const btnText=document.querySel

Javascript 如何仅在pdf中打印我的文本区域而不是整个页面 text任何图像 复制歌词函数copyhtml(){const text=document.querySelector(“#htmlText”);const btnText=document.querySel,javascript,html,printing,textarea,Javascript,Html,Printing,Textarea,如何仅在pdf中打印我的文本区域而不是整个页面 text任何图像 复制歌词函数copyhtml(){const text=document.querySelector(“#htmlText”);const btnText=document.querySelector(“#htmlBtn”);text.select();document.execCommand(“Copy”);btnText.textContent=“Copied”;setTimeout(函数(){btnText.textCont

如何仅在pdf中打印我的文本区域而不是整个页面
text任何图像
复制歌词函数copyhtml(){const text=document.querySelector(“#htmlText”);const btnText=document.querySelector(“#htmlBtn”);text.select();document.execCommand(“Copy”);btnText.textContent=“Copied”;setTimeout(函数(){btnText.textContent=“复制歌词”},5000);}

你好,请告诉我们您正在尝试什么样的东西,以便我们能更好地帮助您。A将是最好的!
<textarea cols="100" id="htmlText" readonly="" rows="50" style="background-color: #ffff4d; border-color: BLACK; border-radius: 10px; border: 4px solid black; color: black; font-size: 1em; font-weight: bold; height: auto; overflow: hidden; resize: none; text-align: center; width: 98%;"> TEXTany images
 </textarea><button id="htmlBtn" onclick="copyhtml()" style="background-color: #0b5394; border-color: rgb(243, 243, 243); border-radius: 1000px; box-shadow: rgb(0, 255, 0) 0px 4px; color: white; cursor: pointer; display: inline-block; font-size: 20px; margin: 40px 50px; padding: 20px 50px; text-align: center; text-decoration: none;">Copy Lyrics</button><script>    function copyhtml() {       const text = document.querySelector("#htmlText");       const btnText = document.querySelector("#htmlBtn");       text.select();       document.execCommand("Copy");       btnText.textContent = "Copied";       setTimeout(function(){           btnText.textContent = "Copy Lyrics";       }, 5000); }</script>