Nest form input inside button
Description
The following code shows how to nest form input inside button.
Example
<!DOCTYPE html>
<html>
<head>
<script type='text/javascript'
src='http://code.jquery.com/jquery-1.9.1.js'></script>
<script type="text/javascript"
src="http://code.jquery.com/mobile/1.3.0-beta.1/jquery.mobile-1.3.0-beta.1.js"></script>
<link rel="stylesheet" type="text/css"
href="http://code.jquery.com/mobile/1.3.0-beta.1/jquery.mobile-1.3.0-beta.1.css">
<style type='text/css'>
.fileinput-button {<!-- w w w . jav a 2s.c o m-->
position: relative;
overflow: hidden;
float: left;
margin-right: 4px;
}
.fileinput-button input {
position: absolute;
top: 0;
right: 0;
margin: 0;
opacity: 0;
filter: alpha(opacity = 0);
transform: translate(-300px, 0) scale(4);
font-size: 23px;
direction: ltr;
cursor: pointer;
}
</style>
</head>
<body>
<span class="fileinput-button" data-role="button" data-icon="plus">
<span>File</span> <input type="file" name="files[]" multiple />
</span>
</body>
</html>