JSFiddle - React, Tailwind, and code Playground
HTML
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>javascript練習1</title>
</head>
<body>
<div class="btn">
<button onclick="myfunction()">我要訂購</button>
<button onclick="yourfunction()">認識工廠</button>
</div>
</body>
</html>
CSS
button{
color: #000;
background-color:#FFFDD0;
padding: 10px;
border-radius: 10px;
border: solid 1px #ccc;
font-weight: 600;
margin: 0 10px;
}
button:hover{
background-color: #ccc;
}
.btn{
display: flex;
justify-content: center;
}
JavaScript
function myfunction(){
alert('謝謝您對我們的衣服有興趣!請致電 0987-654-321,會有專人提供您報價!');
}
function yourfunction(){
alert('我們工廠位於新北市,通過國際 ISO9001 認證,品質讓您放心!');
}