Posts by Thiago Oliveira • 166 points
6 posts
-
3
votes1
answer1225
viewsQ: Width of <option> inside <select>
I own a <select> where the texts that are in <option> are very large. By expanding the <select> on the screen the options come out of it. I need a solution for the whole text to…
-
2
votes3
answers163
viewsA: How can I pass php data to javascript in this case?
On the line where you call the script: echo '<script>criaMapa($infors);</script>'; Change the single quotes ' in double quotes ", leaving so: echo…
-
3
votes3
answers101
viewsA: What condition can I develop to avoid duplicating values?
You can use this code: var soma = 0; var numeros = []; console.log('Soma: ' + soma); while (soma < 1000) { numero = Math.random() * 100; if (numeros.indexOf(numero) < 0) {…
-
3
votes4
answers14684
viewsA: Javascript Regular Expression for Phone with IDD
You can do it this way: var regExp = /^\+?\d{2}?\s*\(\d{2}\)?\s*\d{4,5}\-?\d{4}$/g; var telefone = '+55 (55) 23321-5454'; var resultado = regExp.test(telefone); //retorna true ou false…
-
1
votes3
answers524
viewsA: Regex in javascript for partial match in URL
You can use this regex: /(http:\/\/)?www\.\w+\.com.+/g as follows: var regExp = /(http:\/\/)?www\.\w+\.com.+/g; var url = 'url-aqui'; var resultado = regExp.test(url); //retorna true ou false So you…
-
3
votes2
answers3029
viewsA: Div overlap the other
Following your line of reasoning, I put a position: absolute and a width: 300px in the div containing the text with the percentage. I also changed the position: absolute that was on the div that…
cssanswered Thiago Oliveira 166