html-input

Input event not recognised on <input type=“file”> in Edge

白昼怎懂夜的黑 提交于 2019-12-12 18:16:04
问题 I have a build a dynamic generating Formular including some input fields. <input type='file' style="width: 70%" name="anhang[]" class="anhang" id="anhang0" multiple/> If this input field is filled a new one is generated. The input event listener which is calling the method for generating the new field is the main problem I´m facing: $(document.body).on("input", ".anhang", function (e) { alert("input"); addFileInput(); }); var inputCounter = 0; function addFileInput(){ inputCounter++; $('

HTML text input field with currency symbol in the end of it

独自空忆成欢 提交于 2019-12-12 17:02:37
问题 I would like to have a html5 number input field containing the EUR sign, and no matter what editing occurs to the field, for the sign to be persistent. I tried to do that but the EURO sign is in beginning , I want to move this sign in the end of the input but for some reasons i can't do it? Any help? Result My html code: <span class="input-symbol-euro"> <input type="number" value="0" min="0" step="1" /> </span> Css code: .input-symbol-euro { position: relative; } .input-symbol-euro input {

Append canvas images to input array with JavaScript

僤鯓⒐⒋嵵緔 提交于 2019-12-12 06:04:41
问题 I am trying to get work my code, but I have not been successful. Basically what I want is to apply a resize algorithm to multiple images selected by the user, making them in HTML5 Canvas and then inserting each string (DataURL) in the input array to be sent by via POST method. My code (CLIENT) index.html: <html> <head> </head> <body> <input type="file" id="pictures" multiple><br> <form id="frm" action="save.php" method="POST"> <input type="hidden" name="sizedpics[]" id="sizedpics"> <button

how to underline the access key in an input button

柔情痞子 提交于 2019-12-11 12:43:09
问题 I have a button and I would like to underline the access key letter, <u></u> doesn't work, and C̲ (C̲) changes the font, it should be verdana <input class="boton" type="button" value="C̲ancel" accesskey="C" onclick="cancel();"/> In my css I put the font type: input.boton{ font: bold 11px verdana !important; color: #000; } How can I do this? 回答1: There's no HTML entity you can apply that would render an underline. Inside a value attribute you cannot use other HTML tags, so you can't render an

How to write sum of all input types values in span on change using javascript/jquery?

笑着哭i 提交于 2019-12-11 12:09:21
问题 Currently, i can output each of their value and display it as a series, but what i want is to sum all of their values and display its total. This is my sample Code: Javascript $(function() { $('input[name=selectProducts]').on('change', function() { $('#products').text($('input[name=selectProducts]:checked, input[name=selectProducts][type=text]'').map(function() { return this.value; }).get()); }); }); HTML <input type="checkbox" name="selectProducts" id="product1" value="5" /> <input type=

AngularJS: ngMessage weird behavior with input with type “email”

南楼画角 提交于 2019-12-11 10:07:00
问题 I follow Moving from ngModel.$parsers /ng-if to ngModel.$validators /ngMessages article from Todd Motto's blog and I want to migrate from ng-if to ng-messages . But ng-messages directive behaves very weird when I try to display to user two different messages for <input type="email"> : first, when user leave field empty (then required error occurs) and second, when format is wrong (then email error occurs) - it displays both required and mail messages, but my old code displays only one message

How can I replace html text dynamically?

喜欢而已 提交于 2019-12-11 06:48:53
问题 I'm adding the text "I Tot I Taw a Puddy Tat!" to the top of a page with jQuery this way in the ready function: $("#Twitterati").html("<h3>I Tot I Taw a Puddy Tat!</h3>").append(tweetiePie); ...but I want to dynamically replace that placeholder text ("I Tot I Taw a Puddy Tat!") with the contents of this text input control: <input type="text" name="inputQuery" id="inputQuery" placeholder="Enter something" style="display: inline-block;" /> ...when the Enter key is mashed. How can I do that? I

Get file name from input type file Angular2

為{幸葍}努か 提交于 2019-12-09 02:34:34
问题 I want get the file name from my html input tag in a modal view and save it using Angular2. Can someone help me? 回答1: You can do next: HTML: <input type="file" (change)="fileEvent($event)" /> TypeScript: fileEvent(fileInput: Event){ let file = fileInput.target.files[0]; let fileName = file.name; } 回答2: You can try a more elegant option: HTML: <input #file type="file" (change)="updateFile(file)"> Script: updateFile(file: HTMLInputElement) { let name = file.value; } 回答3: HTML <button (click)=

JSON.stringify() <input> values as numbers?

白昼怎懂夜的黑 提交于 2019-12-08 16:09:52
问题 I am using JSON.stringify() on html <input> s to send through a websocket like so: JSON.stringify({ numberValue: $('#numberValue').val() }) but it encodes $('#numberValue').val() as a String . How can it be encoded as a Number ? 回答1: Convert it to an integer first. JSON.stringify({ numberValue: parseInt($('#numberValue').val(), 10); }) 回答2: You can parse the string: JSON.stringify({ numberValue: parseInt($('#numberValue').val(), 10); }) The parseInt() function parses a string and returns an

Send a textstring from android app to a form on a website?

一个人想着一个人 提交于 2019-12-08 06:29:55
问题 I'm trying to paste a string from my application to a website. My application looks as following: one EditText and one Button. My button opens a website with an open text box. <input name="FreeTextBox" type="text" id="FreeTextBox" style="width:64px;"> this is the text box on the website My application's EditText id is et2 which is then the variable klass in java. klassen = klass.getText().toString(); The klass variable is then made into a string called klassen When I click my button I open a