我也不是要很厉害的会编程,就想把这个放进微搭模版里的一页,写了html的。
<body>
<h1>测测你的xx指数</h1>
<p>输入你的名字</p>
<input type="text" placeholder="%^&*?#" />
<br>
<br>
<button onclick="myFunction()">查看结果</button>
<script>
function myFunction(){
var win = window.open();
win.document.write(Math.floor((Math.random() * 101)*100)/100 + '%');
}
</script>
</body>

你好,可以看下微搭的教程https://cloud.tencent.com/document/product/1301/49510