File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1212 < script src ="node_modules/jquery/dist/jquery.js "> </ script >
1313 < script src ="node_modules/popper.js/dist/umd/popper.js "> </ script >
1414 < script src ="node_modules/bootstrap/dist/js/bootstrap.js "> </ script >
15+
16+ < script type ="text/javascript ">
17+
18+ window . addEventListener ( "load" , function ( event ) {
19+ var variables = window . localStorage . getItem ( "variables" ) ;
20+ var restrictions = window . localStorage . getItem ( "restrictions" ) ;
21+ var iterations = window . localStorage . getItem ( "iterations" ) ;
22+
23+ var obj_function = document . querySelector ( '#fo' ) ;
24+
25+ var HTMLInputsVariables = "" ;
26+ for ( var i = 0 ; i < variables ; i ++ ) {
27+ HTMLInputsVariables += "<div class='col-sm-2'>"
28+ + "<input type='text' class='form-control' placeholder='X" + ( i + 1 ) + "'>" +
29+ "</div>" ;
30+
31+ if ( i != variables - 1 ) {
32+ HTMLInputsVariables += "<p>+</p>" ;
33+ }
34+ }
35+
36+ obj_function . innerHTML = HTMLInputsVariables ;
37+
38+ } ) ;
39+
40+ </ script >
1541</ head >
1642
1743< body >
@@ -29,15 +55,7 @@ <h5>SIMPLEX PO20 <br>Maximizar:</h5>
2955 < h6 style ="text-align: left; "> Função Objetivo:</ h6 >
3056
3157 < div class ="row " id ="fo ">
32-
33- < div class ="col-sm-2 ">
34- < input type ="text " class ="form-control " placeholder ="X1 ">
35- </ div >
36-
37- < p > +</ p >
38- < div class ="col-sm-2 ">
39- < input type ="text " id ="x2 " class ="form-control " placeholder ="X2 ">
40- </ div >
58+ <!--Conteudo gerado dinamicamente via JS-->
4159 </ div >
4260
4361
You can’t perform that action at this time.
0 commit comments