Total members 10262 | Gratitudes |It is currently Thu May 24, 2012 9:50 am Login / Join Codemiles


All times are UTC [ DST ]




Post new topic Reply to topic  Quick reply  [ 8 posts ] 
Author Question
 Question subject: i need help in javascript
PostPosted: Wed Mar 23, 2011 7:44 pm 
Offline
Newbie
User avatar

Joined: Wed Mar 23, 2011 7:39 pm
Posts: 4
Has thanked: 1 time
Have thanks: 0 time

hello world i am very new to javascript and i need some help in it What is the statement in JavaScript that puts the words The grade is and the result of a calculation stored in mygrade up on the screen? this one of questions i cant answer.. somebody help me! please ty


TOP
 Profile Send private message  
Reply with quote  
 Question subject: Re: i need help in javascript
PostPosted: Wed Mar 23, 2011 9:14 pm 
Offline
Mastermind
User avatar

Joined: Tue Mar 27, 2007 10:55 pm
Posts: 2279
Location: Earth
Has thanked: 39 time
Have thanks: 61 time
You can write on screen using document.write function
Code:

<html>
<
body>
<
script>

document.write(' hello');
</script>
</body>
</html>


You can print what is in variable

Code:

<html>
<
body>
<
script>
var sum=0;
var x=5;
var y=3;
sum=x+y;
document.write(sum);
</script>
</body>
</html>


You can print string : 


Code:

<html>
<
body>
<
script>
var 
description="x+y= ";
var sum=0;
var x=5;
var y=3;
sum=x+y;
document.write(description+sum);
</script>
</body>
</html>


_________________
Currenlty programming with : java , html , php , and javascript . (OCJP-6 certified )



For this message the author msi_333 has received gratitude : themadruski
TOP
 Profile Send private message  
Reply with quote  
 Question subject: Re: i need help in javascript
PostPosted: Wed Mar 23, 2011 9:36 pm 
Offline
Newbie
User avatar

Joined: Wed Mar 23, 2011 7:39 pm
Posts: 4
Has thanked: 1 time
Have thanks: 0 time
how about this one : Which loop structure can be set up so that you may or may not enter the loop code?>/p>


TOP
 Profile Send private message  
Reply with quote  
 Question subject: Re: i need help in javascript
PostPosted: Wed Mar 23, 2011 9:40 pm 
Offline
Mastermind
User avatar

Joined: Tue Mar 27, 2007 10:55 pm
Posts: 2279
Location: Earth
Has thanked: 39 time
Have thanks: 61 time
loop ?
like this
Code:

<html>
<
body>
<
script>
 
var 
sum=10;
  for(var 
i=0;i<sum;i++){
    
document.write('Iteration number '+i+'<br/>');
  }

</script>
</body>
</html>

_________________
Currenlty programming with : java , html , php , and javascript . (OCJP-6 certified )


TOP
 Profile Send private message  
Reply with quote  
 Question subject: Re: i need help in javascript
PostPosted: Wed Mar 23, 2011 9:45 pm 
Offline
Newbie
User avatar

Joined: Wed Mar 23, 2011 7:39 pm
Posts: 4
Has thanked: 1 time
Have thanks: 0 time
msi_333 wrote:
loop ?
like this
Code:

<html>
<
body>
<
script>
 
var sum
=10;
  for(var i=0;i<sum;i++){
    document.write('Iteration number '+i+'<br/>');
  }

</script>
</body>
</html>


TOP
 Profile Send private message  
Reply with quote  
 Question subject: Re: i need help in javascript
PostPosted: Wed Mar 23, 2011 9:52 pm 
Offline
Mastermind
User avatar

Joined: Tue Mar 27, 2007 10:55 pm
Posts: 2279
Location: Earth
Has thanked: 39 time
Have thanks: 61 time
@themadruski
you quote my reply ! is your problem solved ?

_________________
Currenlty programming with : java , html , php , and javascript . (OCJP-6 certified )


TOP
 Profile Send private message  
Reply with quote  
 Question subject: Re: i need help in javascript
PostPosted: Wed Mar 23, 2011 9:53 pm 
Offline
Newbie
User avatar

Joined: Wed Mar 23, 2011 7:39 pm
Posts: 4
Has thanked: 1 time
Have thanks: 0 time
msi_333 wrote:
@themadruski
you quote my reply ! is your problem solved ?
yes and no but thanks anyway bro.


TOP
 Profile Send private message  
Reply with quote  
 Question subject: Re: i need help in javascript
PostPosted: Wed Mar 23, 2011 9:59 pm 
Offline
Mastermind
User avatar

Joined: Tue Mar 27, 2007 10:55 pm
Posts: 2279
Location: Earth
Has thanked: 39 time
Have thanks: 61 time
:( :(

_________________
Currenlty programming with : java , html , php , and javascript . (OCJP-6 certified )


TOP
 Profile Send private message  
Reply with quote  
Post new topic Reply to topic Quick reply  [ 8 posts ] 
Quick reply


  

 Similar topics
 JavaScript fade out problem
 javascript read file
 getting gst, pst total to diplay in my javascript form
 need help with javascript
 Javascript select menu validation issue
 validate age entered as selection box in javascript
 Trim string in JavaScript
 check array contains a value using javascript
 Javascript Multi-dimensional Arrays
 print clock using JavaScript

All times are UTC [ DST ]


Users browsing similar posts

Users browsing this forum: No registered users and 1 guest



Jump to:  
Previous Question | Next Question 




Home
General Talks
Finished Projects
Code Library
Games
Tutorials

Java
C/C++
C-sharp
php
Script
JSP/Servlets
Ajax
ASP/ASP.net
Google SEO
Database
Communications
Phpbb3 styles
Photoshop tutorials
Flash tutorials
Find a job






Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
All copyrights reserved to codemiles.com 2007-2011
mileX v1.0 designed by codemiles team