I have HTML code which has buttons and lists, and this includes Java Script also.
I want to create an apex page which displays the html content. just like what I would be getting in a browser.
Is this possible?
below is a sample code, I tried using it in the text of the static page. but the button is not displayed.
<!doctype html>
<html>
<head>
<title> My first java script program </title>
<style type="text/css">
#play_button {
position:absolute;
top: 50px;
left: 200px;
}
</style>
</head>
<script type = "text/javascript">
function addnumbers(x,y)
{
var x = x+y;
return x;
}
function printnumbers()
{
var x = addnumbers(12,23);
document.getElementById('output').innerHTML = x;
}
//document.write(addnumbers(1,2));
</script>
<Form>
<div id = "play_button" >
<input type = "button" value="click" onclick = "printnumbers(); "></input>
</div>
<div id="output"></div>
</Form>
</html>
Try this:
Open in new window
Dan