I wanna change value in span tag element with variable value jquery
I have code like below
<input type="file" name="pdffile" id="fileInput" class="form-control" placeholder="Browse" required>
<span id="pdf" style="display:none;"></span>
And I have jquery like this
$str = $("#fileInput").val();
$splt = $str.split(".");
$('#pdf').text('Your Extension is'.$splt[1]);
Why does it not work?
.innerHTMLis a property, not a function, but in any case it doesn't exist on jQuery objects.