Can someone explain me why a function called "action" creates a type error in the following code as soon as the button is surrounded by the form tags. I assume this leads to a strange conflict with the form's action attribute, but i wonder why it happens in this scope ("action" is not defined in any other way):
<html>
<head>
<script type="text/javascript">
function action() {
alert('test');
}
</script>
</head>
<body>
<form>
<input type="button" value="click" onClick="action();">
</form>
</body>
</html>