Forum : Javscript dout in assignment ?
Brief description  about Online courses   join in Online courses
View vishwanath  srinivas 's Profile

Javscript dout in assignment ?

Please explain solution for the below as i am not able to get the same

1)concatenate two string, and give space between those stings.(dout)

2)Add two number and show result in another browser window. (dout)

javascript is ignoring spaces.Please advice.

Regards,
Vishwa
Asked by vishwanath srinivas | Jun 24, 2010 |  Reply now
Replies (1)
View teacher siliconindia 's Profile
Hi Vishwanath,

1 - var a="hello"
var b="world"

var c=a+" "+b
alert(c)

2 - inside event, simply use document.write() method or define one window and display the result inside.
myWindow = window.open('','','width=200,height=100');
myWindow.opener.document.write("<p>display result here.</p>");
Jun 25, 2010