<div class="form-group"> <label>Type</label> <select class="form-control" name="type" required> <option value="">Please Select</option> <option>Go Only</option> <option>Comback Only</option> <option selected='select' value="Go and Comeback">Go and Comeback</option> </select> </div> <div class="form-group" style="width:45%; margin-left:5%" id="go"> <label>Go</label> <div class='input-group date' id='datetimepicker1'> <input type='text' name="go" class="form-control" value="<?php echo $Start;?>" required> <span class="input-group-addon"> <span class="glyphicon glyphicon-calendar"></span> </span> </div> </div> <div class="form-group" style="width:45%; margin-left:5%" id="comeback"> <label>Comeback</label> <div class='input-group date' id='datetimepicker2'> <input type='text' name="comeback" class="form-control" value="<?php echo $End;?>" required> <span class="input-group-addon"> <span class="glyphicon glyphicon-calendar"></span> </span> </div> </div>
$(document).ready(function(){ $("#go").hide(); $("#comeback").hide(); $('select').change(function(){ var sss = $(this).val(); if(sss == ""){ $("#go").hide() $("#comeback").hide(); } if(sss == "Go Only"){ $("#go").show() $("#comeback").hide() $("#comeback :input").prop('required',null); } if(sss == 'Comback Only'){ $("#go").hide(); $("#go :input").prop('required',null); $("#comeback").show(); } if(sss == "Go and Comeback"){ $("#go").show() $("#comeback").show(); } });
$(document).ready(function(){ $("#go").hide(); $("#comeback").hide(); var sss = $('select'').val(); if(sss == ""){ $("#go").hide() $("#comeback").hide(); } if(sss == "Go Only"){ $("#go").show() $("#comeback").hide() $("#comeback :input").prop('required',null); } if(sss == 'Comback Only'){ $("#go").hide(); $("#go :input").prop('required',null); $("#comeback").show(); } if(sss == "Go and Comeback"){ $("#go").show() $("#comeback").show(); } $('select').change(function(){ var sss = $(this).val(); if(sss == ""){ $("#go").hide() $("#comeback").hide(); } if(sss == "Go Only"){ $("#go").show() $("#comeback").hide() $("#comeback :input").prop('required',null); } if(sss == 'Comback Only'){ $("#go").hide(); $("#go :input").prop('required',null); $("#comeback").show(); } if(sss == "Go and Comeback"){ $("#go").show() $("#comeback").show(); } });
function optionGoBackSelection(target) { var sss = target.val(); if(sss == "") { $("#go").hide() $("#comeback").hide(); } if(sss == "Go Only") { $("#go").show() $("#comeback").hide() $("#comeback :input").prop('required',null); } if(sss == 'Comback Only') { $("#go").hide(); $("#go :input").prop('required',null); $("#comeback").show(); } if(sss == "Go and Comeback"){ $("#go").show() $("#comeback").show(); } } $(document).ready(function(){ optionGoBackSelection($('select')); $('select').change(function(){ optionGoBackSelection($(this)); }) }
เพื่อความปลอดภัยของเว็บบอร์ด ไม่อนุญาติให้แทรก แท็ก [img]....[/img] โดยการอัพโหลดไฟล์รูปจากที่อื่น เช่นเว็บไซต์ ฟรีอัพโหลดต่าง ๆ อัพโหลดแทรกรูปภาพ ให้ใช้บริการอัพโหลดไฟล์ของไทยครีเอท และตัดรูปภาพให้พอดีกับสกรีน เพื่อความโหลดเร็วและไฟล์ไม่ถูกลบทิ้ง