可能是重复问题:
如何在警示框或确认框中加粗文本?
在下面的例子中,我需要为单词“alert”添加样式,以便它显示为:
你好!我是一个警示框!
这是我的代码:
<html><head>
<script type="text/javascript">
function show_alert()
{
alert("Hello! I am an alert box!");
}
</script></head><body>
<input type="button" onclick="show_alert()" value="Show alert box" />
</body></html>