質問編集履歴

4

不要な部分の削除

2019/08/30 00:14

投稿

naotaro0704
naotaro0704

スコア19

test CHANGED
File without changes
test CHANGED
@@ -910,8 +910,6 @@
910
910
 
911
911
  <div class="message1">
912
912
 
913
- </font><br>
914
-
915
913
  </div>
916
914
 
917
915
  </form>

3

不要な部分の削除

2019/08/30 00:14

投稿

naotaro0704
naotaro0704

スコア19

test CHANGED
File without changes
test CHANGED
@@ -910,8 +910,6 @@
910
910
 
911
911
  <div class="message1">
912
912
 
913
- <font color="#ff0000">
914
-
915
913
  </font><br>
916
914
 
917
915
  </div>

2

selectの変更

2019/08/30 00:11

投稿

naotaro0704
naotaro0704

スコア19

test CHANGED
File without changes
test CHANGED
@@ -594,7 +594,17 @@
594
594
 
595
595
  <form:select path="name">
596
596
 
597
+
598
+
599
+ <form:option value="A00101">油性ボールペン</form:option>
600
+
601
+ <form:option value="A00201">極細ボールペン</form:option>
602
+
597
- <form:option value="${ idList}" items=" ${ nameList}"/>
603
+ <form:option value="A00301">蛍光ペン6色セット</form:option>
604
+
605
+ <form:option value="A00401">シャープペンシル</form:option>
606
+
607
+
598
608
 
599
609
  </form:select>
600
610
 
@@ -658,7 +668,221 @@
658
668
 
659
669
  商品:
660
670
 
671
+ <form:select path="name">
672
+
673
+
674
+
675
+ <form:option value="A00101">油性ボールペン</form:option>
676
+
677
+ <form:option value="A00201">極細ボールペン</form:option>
678
+
679
+ <form:option value="A00301">蛍光ペン6色セット</form:option>
680
+
681
+ <form:option value="A00401">シャープペンシル</form:option>
682
+
683
+
684
+
685
+
686
+
687
+ </form:select> <br />
688
+
689
+ </div>
690
+
691
+ <div>
692
+
693
+ <span class="itemQuantity">点数:</span>
694
+
695
+ <form:input path="quantity" size="20" />
696
+
697
+ <form:errors path="quantity" />
698
+
699
+ </div>
700
+
701
+
702
+
703
+ <div class="add">
704
+
705
+ <div>
706
+
661
- <form:select name="id" path="name" items="${nameList}" />
707
+ <input type="submit" name="add" value="明細追加" />
708
+
709
+ </div>
710
+
711
+ </div>
712
+
713
+ </div>
714
+
715
+ </form:form>
716
+
717
+ <form:form modelAttribute="salesForm" action="/sales/system">
718
+
719
+ <div class="main2">
720
+
721
+ <div class="message">
722
+
723
+ <c:out value="${message}" />
724
+
725
+ </div>
726
+
727
+ <div class="">
728
+
729
+ <span class="details">売上明細</span>
730
+
731
+
732
+
733
+ <table class="product">
734
+
735
+
736
+
737
+ <tr>
738
+
739
+ <th>削除</th>
740
+
741
+ <th>商品ID</th>
742
+
743
+ <th>商品名</th>
744
+
745
+ <th>単価</th>
746
+
747
+ <th>点数</th>
748
+
749
+ <th>小計</th>
750
+
751
+ </tr>
752
+
753
+ <c:forEach items="${allList}" var="allList" varStatus="status">
754
+
755
+ <tr>
756
+
757
+ <th><form:radiobutton path="name" label=""
758
+
759
+ value="radiobtn" /></th>
760
+
761
+ <th>${allList.id}</th>
762
+
763
+ <th>${allList.name}</th>
764
+
765
+ <th>${allList.price}</th>
766
+
767
+ <th>${allList.quantity}</th>
768
+
769
+ <th>${allList.subtotal}</th>
770
+
771
+ </tr>
772
+
773
+ </c:forEach>
774
+
775
+ </table>
776
+
777
+ </div>
778
+
779
+
780
+
781
+ <div class="total">
782
+
783
+ 合計:
784
+
785
+ <fmt:formatNumber value="${total}" groupingUsed="true" />
786
+
787
+
788
+
789
+ </div>
790
+
791
+ </div>
792
+
793
+
794
+
795
+
796
+
797
+ <div class="footer">
798
+
799
+ <script type="text/javascript">
800
+
801
+ function remove_row(target) {
802
+
803
+ var TR = target.parentNode.parentNode;
804
+
805
+ TR.parentNode.deleteRow(TR.rowIndex - 1);
806
+
807
+ }
808
+
809
+ </script>
810
+
811
+ <input type="submit" name="remove" value="削除"
812
+
813
+ onclick="remove_row(this)" /> <input type="submit" name="firm"
814
+
815
+ value="確定" />
816
+
817
+ </div>
818
+
819
+
820
+
821
+ </form:form>
822
+
823
+
824
+
825
+ </body>
826
+
827
+ </html>
828
+
829
+
830
+
831
+ ```
832
+
833
+ init画面でソース表示したときのコード
834
+
835
+ ```jsp
836
+
837
+ <!DOCTYPE html>
838
+
839
+ <html>
840
+
841
+ <head>
842
+
843
+ <link rel="stylesheet" type="text/css"
844
+
845
+ href="/sales/resources/css/common.css" />
846
+
847
+ <title>直太郎オンラインショップ</title>
848
+
849
+ </head>
850
+
851
+ <body>
852
+
853
+ <form id="salesForm" action="/sales/system" method="post">
854
+
855
+ <div class="header">
856
+
857
+ <span class="titleName">直太郎オンラインショップ</span>
858
+
859
+ <div class="date">2019-08-30</div>
860
+
861
+ </div>
862
+
863
+
864
+
865
+ <div class="main">
866
+
867
+ <div>
868
+
869
+ 商品:
870
+
871
+ <select id="name" name="name">
872
+
873
+
874
+
875
+ <option value="A00101">油性ボールペン</option>
876
+
877
+ <option value="A00201">極細ボールペン</option>
878
+
879
+ <option value="A00301">蛍光ペン6色セット</option>
880
+
881
+ <option value="A00401">シャープペンシル</option>
882
+
883
+
884
+
885
+ </select>
662
886
 
663
887
  <br />
664
888
 
@@ -668,254 +892,36 @@
668
892
 
669
893
  <span class="itemQuantity">点数:</span>
670
894
 
671
- <form:input path="quantity" size="20" />
895
+ <input id="quantity" name="quantity" type="text" value="0" size="20"/>
672
-
673
- <form:errors path="quantity" />
674
896
 
675
897
  </div>
676
898
 
677
-
678
-
679
- <div class="add">
680
-
681
- <div>
682
-
683
- <input type="submit" name="add" value="明細追加" />
684
-
685
- </div>
899
+ </div>
686
-
687
- </div>
688
-
689
- </div>
690
-
691
- </form:form>
692
-
693
- <form:form modelAttribute="salesForm" action="/sales/system">
694
-
695
- <div class="main2">
696
-
697
- <div class="message">
698
-
699
- <c:out value="${message}" />
700
-
701
- </div>
702
-
703
- <div class="">
704
-
705
- <span class="details">売上明細</span>
706
-
707
-
708
-
709
- <table class="product">
710
-
711
-
712
-
713
- <tr>
714
-
715
- <th>削除</th>
716
-
717
- <th>商品ID</th>
718
-
719
- <th>商品名</th>
720
-
721
- <th>単価</th>
722
-
723
- <th>点数</th>
724
-
725
- <th>小計</th>
726
-
727
- </tr>
728
-
729
- <c:forEach items="${allList}" var="allList" varStatus="status">
730
-
731
- <tr>
732
-
733
- <th><form:radiobutton path="name" label=""
734
-
735
- value="radiobtn" /></th>
736
-
737
- <th>${allList.id}</th>
738
-
739
- <th>${allList.name}</th>
740
-
741
- <th>${allList.price}</th>
742
-
743
- <th>${allList.quantity}</th>
744
-
745
- <th>${allList.subtotal}</th>
746
-
747
- </tr>
748
-
749
- </c:forEach>
750
-
751
- </table>
752
-
753
- </div>
754
-
755
-
756
-
757
- <div class="total">
758
-
759
- 合計:
760
-
761
- <fmt:formatNumber value="${total}" groupingUsed="true" />
762
-
763
-
764
-
765
- </div>
766
-
767
- </div>
768
-
769
-
770
900
 
771
901
 
772
902
 
773
903
  <div class="footer">
774
904
 
775
- <script type="text/javascript">
776
-
777
- function remove_row(target) {
778
-
779
- var TR = target.parentNode.parentNode;
780
-
781
- TR.parentNode.deleteRow(TR.rowIndex - 1);
782
-
783
- }
784
-
785
- </script>
786
-
787
- <input type="submit" name="remove" value="削除"
905
+ <input type="submit" name="add" value="明細追加" />
788
-
789
- onclick="remove_row(this)" /> <input type="submit" name="firm"
906
+
790
-
791
- value="確定" />
792
-
793
- </div>
907
+ </div>
908
+
794
-
909
+ <br>
910
+
795
-
911
+ <div class="message1">
912
+
796
-
913
+ <font color="#ff0000">
914
+
915
+ </font><br>
916
+
917
+ </div>
918
+
797
- </form:form>
919
+ </form>
798
-
799
-
800
920
 
801
921
  </body>
802
922
 
803
- </html>
804
-
805
-
806
-
807
923
  ```
808
924
 
809
- init画面でソース表示したときのコード
810
-
811
- ```jsp
812
-
813
- <!DOCTYPE html>
814
-
815
- <html>
816
-
817
- <head>
818
-
819
- <link rel="stylesheet" type="text/css"
820
-
821
- href="/sales/resources/css/common.css" />
822
-
823
- <title>直太郎オンラインショップ</title>
824
-
825
- </head>
826
-
827
- <body>
828
-
829
- <form id="salesForm" action="/sales/system" method="post">
830
-
831
- <div class="header">
832
-
833
- <span class="titleName">直太郎オンラインショップ</span>
834
-
835
- <div class="date">2019-08-30</div>
836
-
837
- </div>
838
-
839
-
840
-
841
- <div class="main">
842
-
843
- <div>
844
-
845
- 商品:
846
-
847
- <select id="name" name="name">
848
-
849
-
850
-
851
- <option value="A00101">油性ボールペン</option>
852
-
853
- <option value="A00201">極細ボールペン</option>
854
-
855
- <option value="A00301">蛍光ペン6色セット</option>
856
-
857
- <option value="A00401">シャープペンシル</option>
858
-
859
- <option value="A00501">鉛筆H(1ダース)</option>
860
-
861
- <option value="B00101">無線綴ノートA4</option>
862
-
863
- <option value="B00201">リングノートA4</option>
864
-
865
- <option value="B00301">領収書</option>
866
-
867
- <option value="C00101">はさみ(青)</option>
868
-
869
- <option value="C00201">ステープラー</option>
870
-
871
- <option value="C00301">2穴パンチ</option>
872
-
873
- <option value="C00401">ゼムクリップ</option>
874
-
875
- <option value="C00501">消しゴム</option>
876
-
877
-
878
-
879
- </select>
880
-
881
- <br />
882
-
883
- </div>
884
-
885
- <div>
886
-
887
- <span class="itemQuantity">点数:</span>
888
-
889
- <input id="quantity" name="quantity" type="text" value="0" size="20"/>
890
-
891
- </div>
892
-
893
- </div>
894
-
895
-
896
-
897
- <div class="footer">
898
-
899
- <input type="submit" name="add" value="明細追加" />
900
-
901
- </div>
902
-
903
- <br>
904
-
905
- <div class="message1">
906
-
907
- <font color="#ff0000">
908
-
909
- </font><br>
910
-
911
- </div>
912
-
913
- </form>
914
-
915
- </body>
916
-
917
- ```
918
-
919
925
  ### 試したこと
920
926
 
921
927
 

1

ソースの追加

2019/08/30 00:10

投稿

naotaro0704
naotaro0704

スコア19

test CHANGED
File without changes
test CHANGED
@@ -806,6 +806,116 @@
806
806
 
807
807
  ```
808
808
 
809
+ init画面でソース表示したときのコード
810
+
811
+ ```jsp
812
+
813
+ <!DOCTYPE html>
814
+
815
+ <html>
816
+
817
+ <head>
818
+
819
+ <link rel="stylesheet" type="text/css"
820
+
821
+ href="/sales/resources/css/common.css" />
822
+
823
+ <title>直太郎オンラインショップ</title>
824
+
825
+ </head>
826
+
827
+ <body>
828
+
829
+ <form id="salesForm" action="/sales/system" method="post">
830
+
831
+ <div class="header">
832
+
833
+ <span class="titleName">直太郎オンラインショップ</span>
834
+
835
+ <div class="date">2019-08-30</div>
836
+
837
+ </div>
838
+
839
+
840
+
841
+ <div class="main">
842
+
843
+ <div>
844
+
845
+ 商品:
846
+
847
+ <select id="name" name="name">
848
+
849
+
850
+
851
+ <option value="A00101">油性ボールペン</option>
852
+
853
+ <option value="A00201">極細ボールペン</option>
854
+
855
+ <option value="A00301">蛍光ペン6色セット</option>
856
+
857
+ <option value="A00401">シャープペンシル</option>
858
+
859
+ <option value="A00501">鉛筆H(1ダース)</option>
860
+
861
+ <option value="B00101">無線綴ノートA4</option>
862
+
863
+ <option value="B00201">リングノートA4</option>
864
+
865
+ <option value="B00301">領収書</option>
866
+
867
+ <option value="C00101">はさみ(青)</option>
868
+
869
+ <option value="C00201">ステープラー</option>
870
+
871
+ <option value="C00301">2穴パンチ</option>
872
+
873
+ <option value="C00401">ゼムクリップ</option>
874
+
875
+ <option value="C00501">消しゴム</option>
876
+
877
+
878
+
879
+ </select>
880
+
881
+ <br />
882
+
883
+ </div>
884
+
885
+ <div>
886
+
887
+ <span class="itemQuantity">点数:</span>
888
+
889
+ <input id="quantity" name="quantity" type="text" value="0" size="20"/>
890
+
891
+ </div>
892
+
893
+ </div>
894
+
895
+
896
+
897
+ <div class="footer">
898
+
899
+ <input type="submit" name="add" value="明細追加" />
900
+
901
+ </div>
902
+
903
+ <br>
904
+
905
+ <div class="message1">
906
+
907
+ <font color="#ff0000">
908
+
909
+ </font><br>
910
+
911
+ </div>
912
+
913
+ </form>
914
+
915
+ </body>
916
+
917
+ ```
918
+
809
919
  ### 試したこと
810
920
 
811
921