function Demo(){
var nsum = $(2+2=4);
alert(nsum.size());
}
How do I tell the query to solve the problem. I am very new to javascript so don't criticize too bad
Posted 12 January 2011 - 09:50 PM
function Demo(){
var nsum = $(2+2=4);
alert(nsum.size());
}
Posted 13 January 2011 - 06:29 AM
<html> <body> <script> //<!CDATA[ var x = 2; var y = 2; var sum = x + y; alert(x + " plus " + y + " equals " + sum); //]]> </script> </body> </html>
This post has been edited by dbeaird727: 13 January 2011 - 06:30 AM
Posted 13 January 2011 - 10:23 AM
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>javascriptadd</title>
</head>
<body>
<script type= "text/javascript"
//<![CDATA[
function_demo(){
var x = 2;
var y = 2;
var sum = x + y;
alert( x + " plus " + y + " equals " + sum);
}
onload = function_demo();<--Semi-colon or no?
//]]>
</script>
</body>
</html>
Posted 13 January 2011 - 10:51 AM
Quote
onload = function_demo();<--Semi-colon or no?
This post has been edited by Dormilich: 13 January 2011 - 10:53 AM
Posted 13 January 2011 - 10:58 AM
Posted 13 January 2011 - 11:02 AM
This post has been edited by Ntwiles: 13 January 2011 - 11:03 AM
Posted 13 January 2011 - 11:30 AM
Posted 13 January 2011 - 12:17 PM
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>javascriptadd</title>
</head>
<body>
<p>Hi! Check Out My page!</p>
<script type= "text/javascript">
//<![CDATA[
function_demo(){
var x = 2;
var y = 2;
var sum = x + y;
alert( x + " plus " + y + " equals " + sum);
}
onload = function_demo;
//]]>
</script>
</body>
</html>
Posted 13 January 2011 - 12:31 PM
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>javascriptadd</title>
</head>
<body>
<p>Hi! Check Out My page!</p>
<script type= "text/javascript">
//<![CDATA[
function demo(){
var x = 2;
var y = 2;
var sum = x + y;
alert( x + " plus " + y + " equals " + sum);
}
onload = demo;
//]]>
</script>
</body>
</html>
This post has been edited by JMRKER: 13 January 2011 - 12:33 PM
Posted 13 January 2011 - 12:38 PM
function function_demo(){}
