Quantcast
Channel: Active questions tagged html - Stack Overflow
Viewing all articles
Browse latest Browse all 74793

Create a single element instead of multiple tag

$
0
0

Code works as I expected, but is there any possibility to make it in a single tag or in two tags. In id="vCurVal" I get values using scriptlet tag which comes from an other jsp's url.

.labelbold {
    padding-right: 0px;
    padding-left: 0px;
    font-weight: bold;
    font-size: 12px;
    padding-bottom: 0px;
    color: #993333;
    padding-top: 0px;
    font-family: verdana
}
<script type="text/javascript">
var CurrentVal = '<%=strCurrentValue%>';
document.getElementById("vCurVal").innerHTML = CurrentVal;
</script>
<div>
            <label class="labelbold" style="font-weight: bold; float:left;">ORDER NO - &nbsp; </label>
            <div id="vCurVal" class="labelbold" style="font-weight: bold; float:left;"></div>
            <label class="labelbold" style="font-weight: bold; float:left;">&nbsp ALREADY EXIST &nbsp; </label>
        </div> 

Output:

ORDER NO - 37 ALREADY EXIST

And also I tried this way,

<legend class="labelbold" style="font-weight: bold;">&nbsp;&nbsp; ORDER NO - &nbsp; <label id= "vCurVal" style="color:red;"> </label>&nbsp; ALREADY EXIST &nbsp;</legend>

Output

ORDER NO - ALREADY EXIST

This is not showing the dynamic value 37 as I expected.

Values may get changed according to the input.


Viewing all articles
Browse latest Browse all 74793

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>