Posts by Raptador • 33 points
9 posts
-
-1
votes1
answer46
viewsQ: String inside a model in python?
User enters with a string:'a123' I want the program to identify if this string is in the model a%d, where %d is any number. I need to identify the number too.
-
1
votes2
answers263
viewsQ: How to activate a function by an attribute?
Imagine a code: <div id='teste' data-conteudo="funcao()"></div> I want you to take the attribute data-conteudo the function "function()" is triggered, as if it were a value of the…
-
0
votes3
answers1426
viewsA: Find element without tag ID and Name
Well, I don’t understand why not create an id or a name, but in any case: document.getElementsByTagName('button') With this you will get a list with all the "<"button">" of the program, so you…
-
1
votes2
answers684
viewsA: Javascript - Separate a string and then add the values
Almost like: var str = "1 + 4 + 5"; str = str.repalce(" ",""); //remove os espaços str = str.split("+"); //transforma a str em array (lista) for (i=0; i<str.length; i++){ //percorre a lista…
javascriptanswered Raptador 33 -
0
votes2
answers94
viewsQ: How to create an element with child without adding it?
Imagine: var pai = document.createElement('div'); var filho = document.createElement('div'); I want the son is inside the parent before adding it to the document. It is impossible with…
-
0
votes2
answers41
viewsA: Update feathers function once when loading
try to perform the function updateLeilao just when the program loads, do something like: (function()){ atualizaLeilao(); }()); With this the program will execute the function without it needing to…
javascriptanswered Raptador 33 -
0
votes2
answers837
viewsQ: Replacement for Frameset HTML?
I am working with a 100% offline HTML page, I use Frameset to create a side menu that is resizable by the user. I was informed that Frameset or iframe are exceeded, so I would like to know some more…
-
0
votes1
answer227
viewsQ: How to change one HTML file for another?
I have the files: H1.html H2.html start.html Start.html: <frameset cols='20%, *'> <frame src='h1.html' name='menu'> <frame src='h2.html' name='resto'> </frameset> I would…
-
1
votes4
answers5300
viewsA: How to fix the number of numeric characters in a float?
Use the basics: "{0:.number of decimal placesf}". format(number) >>>"{0:.2f}".format(1/7) >>>'0,14' >>> >>>"{0:.5f}".format(1/2) >>>'0.50000'…