下载地址:https://www.pan38.com/share.php?code=VRjxk 提取码:8888 【仅供学习参考】
朋友之间恶搞必备神器哈,可以输入自己信息然后生成逼真的病历单,如果你发给自己的对象或者朋友,那么你绝对会让他惊讶,下面是这款工具的核心生成代码,仅供学习参考哈。
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<title>医疗病历模拟生成器</title>
<style>
body { font-family: 'Microsoft YaHei'; }
.form-container { max-width: 800px; margin: 0 auto; }
.output-area { border: 1px dashed #ccc; padding: 15px; }
</style>
</head>
<body>
<div class="form-container">
<h2>病历信息录入</h2>
<form id="medicalForm">
<!-- 表单内容 -->
</form>
<button id="generateBtn">生成病历</button>
<div id="result" class="output-area"></div>
</div>
<script src="app.js"></script>
</body>
</html>
.getElementById('generateBtn').addEventListener('click', function() {
const formData = {
patientName: document.getElementById('name').value,
diagnosis: document.getElementById('diagnosis').value,
treatment: document.getElementById('treatment').value
};
const template = `
<h3>${new Date().toLocaleDateString()} 门诊病历</h3>
<p><strong>姓名:</strong>${formData.patientName}</p>
<p><strong>主诉:</strong>${document.getElementById('complaint').value}</p>
<p><strong>诊断:</strong>${formData.diagnosis}</p>
<p><strong>处理意见:</strong>${formData.treatment}</p>
<div class="watermark">教学模拟数据 - 非真实病历</div>
`;
document.getElementById('result').innerHTML = template;
});
atermark {
position: absolute;
opacity: 0.2;
font-size: 48px;
transform: rotate(-30deg);
}
.output-area {
position: relative;
background-color: #f9f9f9;
}
原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。
如有侵权,请联系 cloudcommunity@tencent.com 删除。
原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。
如有侵权,请联系 cloudcommunity@tencent.com 删除。