2 forms with outputs on same page conflicting with each other

时间:2017-08-30 20:50:05

标签: javascript html

I am trying to make a single page with at least two (possibly will be more) forms. I tried setting a separate script for the second one while also entering in the correct ID's for each field. But regardless, it always outputs to the first output textarea. I assume there is some way I have to define each separate form for the script. I am new to all this, so not sure how to do that. Would really appreciate any assistance anyone can offer.

==

And the script

===

EDIT: I made the changes suggested by Ivo, but still doesn't seem to be working.

1 个答案:

答案 0 :(得分:0)

Change the id of the form2 textarea to META-INF/services/org.codehaus.groovy.runtime.ExtensionModule:

.dropDownContents{
    display:none;
    }
.dropdown:hover .dropDownContents{
    color:white;
    background-color:black;
    border:solid 1px white;
    vidibility: visible;
    display: block;

and change the line of js where you set the output for form2 to be:

<div class = "dropDownbtn">
    <button class = "dropdown">H1</button>
    <a href = "" class = "dropDownContents">P1</a>
    <a href = "" class = "dropDownContents">P2</a>
</div>