mirror of
https://github.com/rstudio/shiny.git
synced 2026-02-06 20:55:24 -05:00
@@ -1,9 +1,22 @@
|
||||
library(shiny)
|
||||
|
||||
|
||||
ui <- defineUI(
|
||||
h1("Example 1: All Caps"),
|
||||
p(
|
||||
"Input:", br(),
|
||||
input(name='val', type='text', value='Hello World!')
|
||||
),
|
||||
p(
|
||||
"You said:", br(),
|
||||
shinyText("valUpper")
|
||||
)
|
||||
)
|
||||
|
||||
app <- function(input, output) {
|
||||
output$valUpper <- reactive(function() {
|
||||
toupper(input$val)
|
||||
})
|
||||
}
|
||||
|
||||
runApp(client='./www', server=app)
|
||||
runApp(client=page(ui), server=app)
|
||||
|
||||
@@ -1,21 +0,0 @@
|
||||
<html>
|
||||
<head>
|
||||
<script src="shared/jquery.js" type="text/javascript"></script>
|
||||
<script src="shared/shiny.js" type="text/javascript"></script>
|
||||
<link rel="stylesheet" type="text/css" href="shared/shiny.css"/>
|
||||
</head>
|
||||
<body>
|
||||
<h1>Example 1: All Caps</h1>
|
||||
|
||||
<p>
|
||||
Input:<br/>
|
||||
<input name="val" type="text" value="Hello World!"/>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
You said:<br/>
|
||||
<div id="valUpper" class="live-text"/>
|
||||
</p>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user