Skip to content

在文章里面插入html代码前台运营有问题 #544

@a64218481

Description

@a64218481

🐱 职场性格小测试

1. 遇到难题你更倾向于?

自己慢慢想
马上问别人

2. 工作安排你喜欢?

按计划来
灵活变动

3. 说话方式你更?

直接理性
温和照顾情绪

查看结果

<script> function checkResult() { let a = 0, b = 0; const q1 = document.querySelector('input[name="q1"]:checked'); const q2 = document.querySelector('input[name="q2"]:checked'); const q3 = document.querySelector('input[name="q3"]:checked'); if (!q1 || !q2 || !q3) { document.getElementById('result').innerText = '请完成所有题目~'; return; } if (q1.value === 'A') a++; else b++; if (q2.value === 'A') a++; else b++; if (q3.value === 'A') a++; else b++; const res = document.getElementById('result'); if (a >= 2) { res.innerText = '🧐 理智稳重型 · 做事靠谱、逻辑清晰,适合管理与执行'; } else { res.innerText = '😊 温和社交型 · 擅长沟通、人缘超好,适合对接与运营'; } } </script>

比如这个测试代码,在后台预览是可以正常使用的,到前台点查看结果就没反应了,还有很多类似的html代码也不行
https://www.songshukuajing.com/archives/121

Metadata

Metadata

Assignees

No one assigned

    Labels

    待确认问题等待确认是否是已存在的问题

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions