Posts by Scotshield • 36 points
4 posts
-
0
votes5
answers1019
viewsA: Get piece of text inside a javascript word
You can use the match function(). <read more> function contem(frase, palavra){ if(frase != null && palavra != null){ if(frase.match(palavra)) return 'contem'; } return 'não contem'; }…
javascriptanswered Scotshield 36 -
1
votes3
answers649
viewsA: Binary tree removal
From what I can understand this tree is a binary search tree (ABB). Whenever a node is removed, the one that replaces its position in the tree must keep the tree as still a binary search tree. That…
-
0
votes2
answers2712
viewsA: Run PHP function inside onclick or href
I’m not sure I quite understand your question. But one thing you can do is call a JS function and within it have a PHP function. This way you can have the PHP function you want being called by a JS…
-
1
votes1
answer56
viewsA: Javascript function not working correctly
You have to compare numbers instead of characters. Just another thing, name your most intuitive variables. You can’t have a variable named v1, v2. What do they mean? It becomes clearer variables…
javascriptanswered Scotshield 36