0
I will try to be as clear as possible so that you can understand me and help, I have the javascript
next.
function labelthumbs(e) {
document.write('<ul id="test">');
}
It uses the function labelthumbs
and I would like to add another function labelthumbs2
in that same javascript
without having to duplicate and create 2 javascript
with different functions.
Instead of:
function labelthumbs(e) {
document.write('<ul id="teste">');
}
function labelthumbs2(e) {
document.write('<ul id="teste">');
}
I’d like something that looks like this and that works:
function labelthumbs(e)
function labelthumbs2(e)
{
document.write('<ul id="teste">');
}
There is not much feeling, why not create a single function that does both actions? I just don’t understand why you are using the variable and which is usually used for events and by your example both functions do exactly the same thing.
– RpgBoss
Explain your need better. The way you explained it is not making sense.
– DiegoSantos
It didn’t make sense to me. You could call the function more than once, or put duplicate content
<ul><ul>
. I think in order to help you we need to understand what your goal is with the function.– Caique Romero
Ideal would be to explain the need to do this.
– Felipe Coelho