小白提问 写了个html的代码要怎么放进微搭里成为一页哦?
发布于 4 年前 作者 fanjie 859 次浏览 来自 官方Issues

我也不是要很厉害的会编程,就想把这个放进微搭模版里的一页,写了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>

1 回复

按照wxml的格式来写就好了。

https://developers.weixin.qq.com/community/business/doc/00008c2f9d83a040de5ad3a945b80d

可以在这里学一学如何写wxml。

回到顶部