I want to create an alert with two lines
Today’s Date
Sat March 3 12:35:58 EST 2012
I have used syntax alert(“Today’s date is : </br> “+dt);
and alert(“Today’s date is : “+<br />dt);
But none is working. Is it possible to create two line alert ? If yes, how ?
[code]<!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Strict//EN”
“http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd”>
<html xmlns=”http://www.w3.org/1999/xhtml” lang=”en” xml:lang=”en” >
<head>
<title>Javascript Assignment 1</title>
<script type=”text/javascript”>
function backgcolor(){
document.bgColor=”#ff0000″;
}
function txtcolor(){
document.fgColor=’green’;
}
function alertfn(){
alert(“This is test alert”);
}
function displayDate(){
var dt = new Date();
alert(“Today’s date is : “+dt);
}
function writeDate(){
var dt = new Date();
document.write(dt);
}
</script>
</head>
<body>
<p>
<input type=”button” value=”Change Background Color” onclick=”backgcolor()” />
<input type=”button” value=”Change Text Color” onclick=”txtcolor()” />
<input type=”button” value=”Test Alert” onclick=”alertfn()” />
<input type=”button” value=”Get Date” onclick=”displayDate()” />
<input type=”button” value=”Write Date” onclick=”writeDate()” />
<br /><br />
Unlike Java, C++ doesn’t incorporate a debugger into every application. If you need one you have to provide it. Your compiler typically has one.
Just start it up and run your application. Car.cpp:381:runtime_exception:Could not find the brake Police.cpp:123:traffic_observation_exception: Speed too high
Driver.cpp:2131:existential_exception:I am in jail. If you happen to be developing on a system like Linux, then you could use one of many utilities such as electric fence. These are designed to
provide the platform specific capabilities you seem to be looking for, ∧ unless I’m mistaken, they tie into GDB. Well, I want this stack trace as a final output for the end user. I am
writing a kind of compiler where I process user input. I have a parser that reads user input and constructs sth called Items or int primitives
</p>
</body>
</html>
Thanks