I need to convert for example the value "025"
for "0.25" or "005" for "0.05" :
I'm trying to do it like this:
var valor1 = $("#ValorDesconto").val().replace(/[^\d]+/g,'');
parseFloat(valor1).toFixed(2)
How do I? the way I did abov...
In the face of certain problems during my development the following doubts arose for example.
When I use the ajax tag in Primefaces , it has the event property where we pass events, so I had some questioning.
Once I had...
And then everyone's beauty?
I'm half doubt stupid, but I could not find an answer.
I've been parsing a few sites and seen that instead of calling a $.AJAX request on the server to populate a dropdown data, for example, they call...
Personal I'm doing a time validation in Javascript . I can not type the following hours 14:00, 15:00, 16:00 until 20:00, but other hours with you.
I'm doing this:
var mask = "HH:MM",
pattern = {
'translation': {...
When I submit a form, through onsubmit(checkFormIsCorrect()) , I call this javascript function that will validate several situations and submit or not the form.
In this function:
function checkFormIsCorrect() {
if (!$('div.has-err...
I'm doing a web application with AngularJS and made this routeprovider to single page
angular.module("app").config(function($routeProvider){
$routeProvider.when("/Proposta", {
templateUrl:"Proposta.html",
controller :"ClienteCo...
I forgot how to make links with jQuery that execute when clicking on a div. The link I needed was with target blank.
I found this from here but I did not understand the code and could not use it.
jquery('a[href="http://site.com"]').attr('ta...
When I want to debug an event associated with an element via jQuery, I can currently do it in the following ways:
In Chrome, you can enable the debugger specifically for certain types of events. However, this is not useful when it is necess...
Lately I have accessed several news sites that use this meta tag to update their pages from time to time:
<meta http-equiv="refresh" content="300">
I understand the reason for using it from sites, but over time this functionality beco...