ruzD ruzD - 1 year ago 84
CSS Question

HTML & CSS - Change text value in input button

I'm trying to change the text value of the input button. I know to do it is the parameter value='' but in this case it doesn't working fine.

My code:

<link href="" rel="stylesheet">
<link rel="stylesheet" href="assets/bootstrap/css/bootstrap.min.css">
<link href="assets/css/custom-sugar-style.css" rel="stylesheet">
<div class="container-fluid">
<div class="row">
<div class="col-md-12 text-center">
<img class="img-sugar" src="assets/images/SUGAR.png" />
<div class="row">
<div class="col-md-12 text-center">
<form action="shareimage.php" method="post">
<input class="button-camera" type="file" accept="image/*" capture="camera" value="Take a photo" />

Could you help me?


Answer Source
<!DOCTYPE html>
<title>Page Title</title>
<script language="JavaScript" type="text/javascript">
function HandleBrowseClick()
var fileinput = document.getElementById("browse");;
function Handlechange()
 var fileinput = document.getElementById("browse");
  var textinput = document.getElementById("filename");
  textinput.value = fileinput.value;

 <input type="file" id="browse" name="fileupload" style="display: none"    onChange="Handlechange();"/>

 <input type="button" value="Take a photo" id="fakeBrowse"    onclick="HandleBrowseClick();"/>No file chosen

Try this technique and apply your css class in it.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download