<!DOCTYPE html>
<html>
<head>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
<script src="http://code.jquery.com/jquery-1.9.1.js"></script>
<script>
function formSubmit()
$('#newhtml').html('hello world');
</script>
</head>
<body>
First name: <input type="text" id="fname" name="fname"><br>
<input type="button" onclick="formSubmit()" value="Search Data">
<div id="newhtml"></div>
</body>
</html>
위의 코드에서 formSubmit() 기능을 실행하는 버튼을 클릭하면 내 div newhtml이 hello world로 변경되지 않습니다.자바 스크립트 버튼 onclick 문제
위의 코드 문제 있나요 ..
감사합니다!
기능이 올바르지 않습니다. 중괄호로 묶지 않습니다. –
코드에 두 가지 버전의 jQuery가있는 이유는 무엇입니까? 그리고 왜 Hello World를 인쇄하기 위해 jQuery를 사용합니까 ??? – MarsOne