<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
<script>
function multi(){
var f = document.getElementById('first').value;
var s = document.getElementById('second').value;
var mul = f*s;
var result = document.getElementById('result');
result.textContent = mul; /* innerHTML: 객체의 값을 문자열로반환 보안 취약 textContent 보안에 강함 */
}
</script>
</head>
<body>
<input type='text' id='first'><br>
<input type='text' id='second'><br>
<button onclick='multi()'>제출</button>
<br>
<p><output id = 'result'>입니다</output></p>
</body>
</html>