JavaScript not working with Chrome & Xampp!

Posted by Anonymous on Stack Overflow See other posts from Stack Overflow or by Anonymous
Published on 2010-06-09T07:38:49Z Indexed on 2010/06/09 7:42 UTC
Read the original article Hit count: 113

Filed under:
|
|
|

Hi, I've been trying for a couple hours now to figure out why JavaScript wouldn't work. The code works, but here it is anyway.

<script type="text/javascript">
function change(text)
{
document.f1.ta.value="Hi!";
}
</script>
<form name="f1">
<input type="textarea" id="ta"/>
<input type="button" action='change("Hi!")'/>
</form>

When I click the button, it does nothing. When I write "document.f1.ta.value="Hi!";" in the Chrome's inspector console, it works. I am using XAMPP (for Windows) 1.7.3 Windows 7 Ultimate.

© Stack Overflow or respective owner

Related posts about JavaScript

Related posts about html