这是一段使用strong标签加粗的文本。 这是普通文本。
这是一段使用b标签加粗的文本。 这是普通文本。
这是普通文本。
<%
// 模拟动态数据
String[] items = {
"重要通知:系统将于今晚进行维护" "欢迎新用户注册" "推荐:新产品发布" ":请及时更新个人信息" };
String[] priorities = {"high"medium" ""high" %>
for(int i = 0; i < items.length; i++) {
String boldClass = ""equals(priorities[i]) ? "font-bold text-red-600" " %>
rounded"
"
<%= items[i] %>
<%
}
%>
class="e68371f6fde571f4 w-full px-4 py-2 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent"
let currentWeight = 'normal';
let weightValue = 400;
function toggleBold() {
const demoText = document.getElementById('demoText');
const weightValueEl = document.getElementById('weightValue');
if (currentWeight === 'normal') {
demoText.style.fontWeight = 'bold';
weightValueEl.textContent = 'bold';
currentWeight = 'bold';
weightValue = 700;
} else {
demoText.style.fontWeight = 'normal';
weightValueEl.textContent = 'normal';
currentWeight = 'normal';
weightValue = 400;
}
}
function increaseWeight() {
const demoText = document.getElementById('demoText');
const weightValueEl = document.getElementById('weightValue');
if (weightValue < 900) {
weightValue += 100;
demoText.style.fontWeight = weightValue;
weightValueEl.textContent = weightValue;
}
}
function updatePreview() {
const customText = document.getElementById('customText').value || '示例预览文本';
const boldLevel = document.querySelector('input[name="dLevel"]:checked').value;
const previewText = document.getElementById('previewText');
previewText.textContent = customText;
previewText.style.fontWeight = boldLevel;
}
// 初始化预览
document.addEventListener('DOMContentLoaded', function() {
updatePreview();
});