따옴표를 설정하려면 요소를 사용하세요. 그와 함께 인용부호의 유형을 인용부호 속성으로 추가하십시오.
예시
다음 코드를 실행하여 JavaScript로 포함된 따옴표의 따옴표 유형을 설정할 수 있습니다 −
<!DOCTYPE html>
<html>
<body>
<q id = "myID">Amit</q><br>
<button onclick = "display()">Update Quotation Marks</button>
<script>
function display() {
document.getElementById("myID").style.quotes = "'\\2039' '\\203A'";
}
</script>
</body>
</html>