Click here to Skip to main content
15,895,799 members
Articles / Web Development / HTML

Simple Browser Iteration Test

Rate me:
Please Sign up or sign in to vote.
3.50/5 (2 votes)
25 Mar 2009CPOL 25.6K   76   6  
Check different browsers' responses to a simple iteration test (JavaScript).
<html>
<head>
	<title>Test</title>
</head>
<body>
	<textarea id="text" style="height: 300px;" cols="80" rows="20"></textarea>

	<script language="javascript" type="text/javascript">
		var t = document.getElementById("text");
		var d1 = Date();
		for (var i = 0; i < 10000; i++) {
			t.value += i.toString();
		}
		var d2 = Date();
		document.write("<br />" + d1 + "<br />" + d2);
	</script>

</body>
</html>

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Architect
United States United States
I got my BS in Software Engineering from Iran, worked there for 4.5 years mainly in industrial automation field. Then I moved to Australia. In Australia, I had a great chance to work at some big companies. Since 2009 I have been living in the States. I received my MS in Information Systems from Illinois State University. Currently, I am a Senior Software Development Engineer.

Comments and Discussions