DocumentRoot "c:/Wamp/www" <Directory "c:/Wamp/www">To
# DocumentRoot "c:/Wamp/www" # <Directory "c:/Wamp/www"> DocumentRoot "d:/htdocs" <Directory "d:/htdocs">
<?php
phpinfo();
?>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html" charset="UTF-8">
</head>
<body>
<form method="post" action="catchName.php">
<input type="text" name = "name">
<input type="text" name = "email">
<input type="submit" name = "submit" value="전송합니다" />
</form>
</body>
</html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html" charset="UTF-8">
</head>
<body>
<?php
echo $_POST['name'];
echo "<br />";
echo $_POST['email'];
?>
</body>
</html>
var widgetAPI = new Common.API.Widget(); widgetAPI.sendReadyEvent(); // Send "ready" message to app manager var tvKey = new Common.API.TVKeyValue(); var Main = { }; Main.onLoad = function() { // Enable key event processing this.enableKeys(); widgetAPI.sendReadyEvent(); }; Main.onUnload = function() { }; Main.enableKeys = function() { document.getElementById("anchor").focus(); }; Main.keyDown = function() { var keyCode = event.keyCode; alert("Key pressed: " + keyCode); switch(keyCode) { case tvKey.KEY_RETURN: case tvKey.KEY_PANEL_RETURN: alert("RETURN"); widgetAPI.sendReturnEvent(); break; case tvKey.KEY_LEFT: // alert("LEFT"); document.getElementById("hello").innerHTML = "LEFT"; break; case tvKey.KEY_RIGHT: // alert("RIGHT"); document.getElementById("hello").innerHTML = "RIGHT"; break; case tvKey.KEY_UP: alert("UP"); break; case tvKey.KEY_DOWN: alert("DOWN"); break; case tvKey.KEY_ENTER: case tvKey.KEY_PANEL_ENTER: // alert("ENTER"); document.getElementById("hello").innerHTML = "Here we go. Enter!"; break; default: alert("Unhandled key"); break; } };
* { padding: 0; margin: 0; border: 0; } /* Layout */ body { width: 1280px; height: 720px; background-color: #FFF; } #hello { font-size:250px; }
<!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <title>HelloTV</title> <!-- TODO : Common API --> <script type="text/javascript" language="javascript" src="$MANAGER_WIDGET/Common/API/Widget.js"></script> <script type="text/javascript" language="javascript" src="$MANAGER_WIDGET/Common/API/TVKeyValue.js"></script> <!-- TODO : Javascript code --> <script language="javascript" type="text/javascript" src="app/javascript/Main.js"></script> <!-- TODO : Style sheets code --> <link rel="stylesheet" href="app/stylesheets/Main.css" type="text/css"> <!-- TODO: Plugins --> </head> <body onload="Main.onLoad();" onunload="Main.onUnload();"> <!-- Dummy anchor as focus for key events --> <a href="javascript:void(0);" id="anchor" onkeydown="Main.keyDown();"></a> <!-- TODO: your code here --> <label id="hello">Hello TV</label> </body> </html>