jamiecottonuk
Technical User
Hi All,
I have the following code which runs fine
However I want it so that hello and jamie are displayed on 2 lines so like
Hello
Jamie
I know you have to put to add a space but what do you have to put if you want to add a new line
Cheers
I have the following code which runs fine
Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "[URL unfurl="true"]http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">[/URL]
<html xmlns="[URL unfurl="true"]http://www.w3.org/1999/xhtml">[/URL]
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<script type="text/javascript">
function changeContent(id,shtml)
{
if (document.getElementById || document.all)
{
var el = document.getElementById? document.getElementById(id): document.all[id];
if (el && typeof el.innerHTML != "undefined") el.innerHTML = shtml;
}
}
function myMessage(message)
{
alert(message)
}
</script>
</head>
<body>
<div id="sidebar" style="width:300px; border:1px solid black">
<a href="#" onclick="changeContent('content',' More content <br/><a href=\'#\' onclick=myMessage(\'hello jamie\')>another Link</a>');" /> Click here to change content</a>
</div>
<br/>
<div id="content" style="width:300px; border:1px solid black">
</div>
</body>
</html>
However I want it so that hello and jamie are displayed on 2 lines so like
Hello
Jamie
I know you have to put to add a space but what do you have to put if you want to add a new line
Cheers