I'm so sorry for asking but where should I insert or save C++.:rolleyes::rolleyes::rolleyes::rolleyes::rolleyes::rolleyes::rolleyes::rolleyes::rolleyes::rolleyes::rolleyes::rolleyes::rolleyes::rolleyes::rolleyes::rolleyes::rolleyes::rolleyes::rolleyes::rolleyes::rolleyes::rolleyes::rolleyes:
I'm skilled in html css and javascript but I don't get this.


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html>
<head>
<title>Test</title>

<script type="text/javascript">
function test()
{
alert("NIET KLIKKEN VERDOMME")
}
</script>

<script type="text/javascript">
function startTime()
{
var today=new Date()
var h=today.getHours()
var m=today.getMinutes()
var s=today.getSeconds()


m=checkTime(m)
s=checkTime(s)
document.getElementById('txt').innerHTML=h+":"+m+":"+s
t=setTimeout('startTime()',500)
}

function checkTime(i)
{
if (i<10)
{i="0" + i}
return i
}
</script>

</head>

<body bgcolor="#FFFFE1" onload="startTime()">
<center><div id="txt"></div>

<script type="text/javascript">
var d = new Date()
var time = d.getHours()
if (time>5 && time<12)
{
document.write("Good morning!")
}
else if (time>11 && time<18)
{
document.write("Good day!")
}
else if (time>17 && time<24)
{
document.write("Good evening!")
}
else
{
document.write("Good night!")
}
</script></center>

<br/>
<center>
<table border="0" width=50%>
<tr>
<center><input type="button" value="klikken" onclick="test()"></center>
</tr>
<tr>

</tr>

</table>
</center>

</body>

I still don't understand what you want to do. Do you want to write a comparable version of the posted code in C++? Do you want to insert some C++ code into the code you currently posted? What exactly do you want to do?

I still don't understand what you want to do.

I agree. You may be skilled in HTML and CSS, but this is a C/C++ board. You post code here, not HTML/CSS markup language.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.