javascript - 如何为调查保存号码?
问题描述
我对 html 和 js 非常陌生,搜索并没有给我答案。我的问题是我想通过单击一个按钮来更改变量+1,以便它不会在重新加载时返回,我希望这个数字可以显示在另一个站点上。我的测试:更改数字的按钮:回答 1out of 4
let A1 = '1';
function Antwort1(){
var A1 = 'A1' + 1
}
function resultA1(){
document.write(A1)
}
ul{font-family: arial;}
span, table, ul, p, p3, p2, h3, h1, h2, a, button{text-align: center; margin:auto ; font-family: arial; :}
p{margin-top: 0; margin-bottom: 0;}
h1{text-decoration: underline; font-size: 4em ; background-color: lightblue}
h3{ font-size: 2em;}
p{font-size: 24px}
p2{font-size: 18px}
body{background: white}
button{font-size: 27px ; float: center ; cursor: pointer ; background-color: lightblue ; color : black ; border: solid white}
button:hover {font-size: 27px ; float: center ; cursor: pointer ; background-color: white ; color : lightblue ; border: solid lightblue}
p3{text-align: center}
.container{margin: auto; border: none ; display:grid; align-items:center ;justify-contend: center}
<html>
<script src="../index.js">
</script>
<link rel="stylesheet" href="..\formate.css" >
<link rel="script" href="../index.js"
<head>
</head>
<body>
<h1>Frage 1</h1>
<h2>wie oft hast du online Unterricht, anstatt Aufgaben?</h2>
<p>
<button id="A1" onclick="Antwort1()">nie</button>
</p>
</body>
</html>
解决方案
推荐阅读
- excel - 匹配多个条件的两个表中的值
- javascript - 是否可以在 chrome 中打开磁盘上的 .md 文件,进行编辑并保存回磁盘?
- javascript - 引擎字段是必需的,但在 functions\package.json 中找不到
- ios - Xcode 不支持 iOS:找不到设备支持文件
- kubernetes - 如何在 Kubernetes 上定义 localhost
- android-studio - 如果我按照 Flutter 中的指南进行操作,为什么会出现 Gradle 错误?
- css - 我可以有 12.5px 的字体大小吗?
- c# - C# ASPNET 使用 SQL Server 存储过程
- c++ - 无法附加到正在休眠的 Windows 服务
- intellij-idea - Kotlin - DSL 颜色样式