因此,我只希望在响应中出现两次的名称以斜体显示。我是一个真正的菜鸟,所以请帮助我并清楚。我很感激 http://dave-reed.com/book3e/Ch5/greet.html 这是示例网站。我希望您的名字仅在响应中用斜体字显示。
<!DOCTYPE html>
<!-- saved from url=(0042)http://dave-reed.com/book3e/Ch5/greet.html -->
<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title> Greetings </title>
</head>
<body>
<h2>Greetings</h2>
<p>
Enter your name: <input type="text" id="nameBox" size="12" value="">
</p>
<input type="button" value="Click for Greeting" onclick="document.getElementById('outputDiv').innerHTML=
'Hello ' + document.getElementById('nameBox').value +
', welcome to my page.<br>Do you mind if I call you ' +
document.getElementById('nameBox').value + '?';">
<hr>
<div id="outputDiv"></div>
</body></html>