我希望我的第二个文本区域标记仅用于输出文本而不是用于输入,但我也不知道如何,我尝试将类型设置为“输出”,但不幸的是这不起作用。感谢您花时间阅读本文,请查找下面的代码。我还想补充一点,我不知道为什么我的按钮位于文本区域下方,在我常用的网站上,按钮位于文本区域旁边。
function myFunction(){
var text = document.getElementById('input').value;
var textArray = text.split(" ").sort();
var output= document.getElementById('output');
output.value = textArray.toString().replace(/,/g," ");
}
function maFunction() {
var copyText = document.getElementById("output");
copyText.select();
copyText.setSelectionRange(0, 99999)
document.execCommand("copy");
}Run Code Online (Sandbox Code Playgroud)
body {
margin-top: 20px;
margin-left: 20px;
display: flex;
}
.txt {
margin-right: 20px;
background: #ffffff;
border-style: solid;
border-color: #4CAF50;
border-width: 2px;
outline: none;
height: 700px;
width: 45%;
border-radius: 10px;
/*box-shadow: 0 4px 8px 0 rgba(141, 105, 105, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);*/
margin-top: 0px; …Run Code Online (Sandbox Code Playgroud)我目前正在跟踪YouTube上的新手教程的Pygame这里,但即使我从教程我pygame的窗口只保持打开约一秒,然后关闭精确复制的代码。
注意:大约三年前有人在这里问过这个问题,但它没有解决我的问题。我的代码在下面
import pygame
pygame.init()
win = pygame.display.set_mode((500, 500))
pygame.display.set_caption('hello world')
Run Code Online (Sandbox Code Playgroud) 是否可以在 Windows 10 上使用 python 取消最小化最小化窗口?(我使用的是python 3.8)
我会添加更多细节,但这就是我要说的。