TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Aruljothy Sundaramoorthy
NA
311
49.2k
Can anyone fix this error!
Dec 25 2018 10:53 AM
Here is the code
<!DOCTYPE html>
<html lang=
"en"
>
<head>
<meta charset=
"UTF-8"
>
<meta name=
"viewport"
content=
"width=device-width, initial-scale=1.0"
>
<meta http-equiv=
"X-UA-Compatible"
content=
"ie=edge"
>
<title>Calculator</title>
<script type=
"text/javascript"
>
var
rows = prompt(
"Enter no. of rows"
);
var
cols = prompt(
"Enter no. of cols"
);
if
(rows==
""
||rows==
null
)
rows=10;
if
(cols==
""
||cols==
null
)
cols=10;
createTable(rows, cols);
Function createTable(rows, cols)
{
var
j=1;
var
output=
"<table border='1' width='500' cellspacing='0' cellpadding='5'>"
;
for
(i=1;i<=rows;i++)
{
output=output+
"<tr>"
;
while
(j<=cols)
{
output=output+
"<td>"
+i*j+
"</td>"
;
j=j+1;
}
output=output+
"</tr>"
;
j=1;
}
output=output +
"</table>"
;
document.write(output);
}
</script>
</head>
<body>
</body>
</html>
Thanks in advance
Reply
Answers (
2
)
Uncaught SyntaxError: missing ) after argument list
How can I call the specific description in loop.