ต่อไปนี้คือรหัสสำหรับลบลูกศร/สปินเนอร์จากประเภทอินพุตโดยใช้ CSS -
ตัวอย่าง
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1" />
<style>
input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
-webkit-appearance: none;
margin: 0;
}
input[type="number"] {
-moz-appearance: textfield;
}
</style>
</head>
<body>
<h1>Input Numbers Hide Arrows</h1>
<input type="number" value="10">
<h2>Only numbers can be entered in the above field</h2>
</body>
</html> ผลลัพธ์
ความประสงค์ของเขาจะสร้างผลลัพธ์ดังต่อไปนี้ -
