how can i use my javascript code with my asp.net page

hi,

i have written the following javascript code. however i am writing my web application using visual web developer 2008 express edition, and i am finding it hard to incorporate it into my asp.net page. can i use javascript in asp.net page? does anybody have any suggestions as to how i can do this. the point of my code is to have a series of text appear on the web page in a sequence on after the other. please can someone help me, any suggestions will be appreciated.

<html>
<head>

<script type="text/javascript">
function timedText() {
var t1=setTimeout("document.getElementById('displayDiv').innerHTML+='2 seconds!<br>'",2000);
var t2=setTimeout("document.getElementById('displayDiv').innerHTML+='4 seconds!<br>'",4000);
var t3=setTimeout("document.getElementById('displayDiv').innerHTML+='6 seconds!'",6000);
}
</script>
</head>

<body>
<form>
<input type="button" value="Display timed text!" onClick="timedText()">
<div id="displayDiv">
</div>

<p>Click on the button above. It will tell you when two, four, and six seconds have passed.</p>
</body>

</html>

Read More

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s