change,Ringo題目
阿新 • • 發佈:2018-10-25
UNC ace font margin 題目 str1 ner charset utf-8
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>我的前端作業</title>
</head>
<body>
<div class="wrap" style="margin-top: 100px; margin-left: 500px">
<button onclick="changes()">我要變身啦</button>
<p>Paul,Paula,Pauline,paul,Paul把Paul換成Ringo</p>
<p style="color: red ;font-size: xx-large ">我要變身啦</p>
<p id="demo">Paul,Paula,Pauline,paul,Paul把Paul換成Ringo</p>
<script type="text/javascript">
function changes() {
var str="Paul,Paula,Pauline,paul,Paul";
var str1=str.replace(/\bPaul\b/g,"Ringo");
document.getElementById("demo").innerHTML=str1;
}
</script>
</div>
</body>
</html>
change,Ringo題目