I have a list of buttons ( <li> ):
<li id="1">link 1</li>
<li id="2">link 2</li>
<li id="3">link 3</li>
<li id="4">link 4</li>
<li id="5">link 5</li>
When the user clic...
I need to list objects and I have used the following function that is in jQuery. Is there an alternative to this in JavaScript only?
$.each(object, function(index, value) {
console.log(value);
});
What command can I use to know if a string contains only numbers?
For example, I'm using prompt :
var quantidade=prompt('Quantidade de entrada de produtos(somente números)');
I would like to check if actually in the variable qua...
I'm learning how to use Regex and would like to know if I can get it to accept a maximum of 2 in some sequence (it may contain letters or numbers)
Eg:
"sskfdam09471928"
Approved
"asldk02210920139"
Disapproved by repeating twice
How can I replace only a certain part of a string ? Example:
var linha_nova = "EU TENHO UM CACHORRO";
I want to replace only the word "UM" with another. How should I proceed?
I also need to replace with the known position of the...
I have this segment of code, I would like someone to help me in transforming the variable P (in which it takes the attribute 'value') and transform it into number value for the sum.
$(document).ready(function(e) {
$('.pizzad...
In PHP I would use:
for($i = 3; $i <= ceil(sqrt($num)); $i = $i + 2) {
if($num % $i == 0)
return false;
}
What is the function to do the verification using JS?
I have two combobox, I need to get the id of one to load the other from the item that was selected in combobox1, how could I do this through a javascript function.
<select id="cb_catinsumo" class="combo" name="cb_catinsumo" class="combo2"&g...
Explanation:
I have a <div> parent that contains two <div> daughters, however I would like to insert a <table> using javascript, between, that is, in the middle of these two <div> daughters...