「JavaScript実験用ページ」の編集履歴(バックアップ)一覧はこちら

JavaScript実験用ページ」(2017/11/01 (水) 16:54:42) の最新版変更点

追加された行は緑色になります。

削除された行は赤色になります。

*概要 JavaScriptを試すためのページです。 自動予備審査プログラムテスト用 #javascript(){ <script src="https://code.jquery.com/jquery-3.2.1.min.js"></script> <script> //alert("test"); $(function() { //セレクトボックスが切り替わったら発動 $('#base_class').change(function() { if ($(this).val() == "0") { $("#hp_base").html(""); $("#en_base").html(""); $("#front_base").html(""); $("#back_base").html(""); } else if ($(this).val() == "1") { $("#hp_base").html("(基本:660)"); $("#en_base").html("(基本:25)"); $("#front_base").html("(基本:260km/h)"); $("#back_base").html("(基本:180km/h)"); } else if ($(this).val() == "2") { $("#hp_base").html("(基本:780)"); $("#en_base").html("(基本:40)"); $("#front_base").html("(基本:170km/h)"); $("#back_base").html("(基本:130km/h)"); } else if ($(this).val() == "3") { $("#hp_base").html("(基本:1100)"); $("#en_base").html("(基本:120)"); $("#front_base").html("(基本:70km/h)"); $("#back_base").html("(基本:50km/h)"); } else if ($(this).val() == "4") { $("#hp_base").html(" 基本:550"); $("#en_base").html("(基本:45)"); $("#front_base").html("(基本:130km/h)"); $("#back_base").html("(基本:100km/h)"); }});}); </script> } *基本情報 #html2(){ 機体名称:<input type="text" name="tdm_name"><br/> 機体製作者:<input type="text" name="creater_name"><br/> クラス:<select name="base_class" id="base_class"> <option value="0" selected>   </option> <option value="1">軽量型</option> <option value="2">中量型</option> <option value="3">重量型</option> <option value="4">支援型</option> <option value="5">格闘型</option> <option value="6">軽飛行型</option> <option value="7">重飛行型</option> <option value="8">固定翼型</option> </select> } *機体スペック #html2(){ 機体サイズ: <label><input type="radio" name="body_size" value="1">極小</label> <label><input type="radio" name="body_size" value="2">小</label> <label><input type="radio" name="body_size" value="3" checked="checked">中</label> <label><input type="radio" name="body_size" value="4">大</label> <label><input type="radio" name="body_size" value="5">極大</label> <br/> 旋回速度: <label><input type="radio" name="turn_speed" value="1">遅い</label> <label><input type="radio" name="turn_speed" value="2" checked="checked">普通</label> <label><input type="radio" name="turn_speed" value="3">速い</label> <br/> ジャンプ高度:<input type="text" name="jump">m<span id="jump_height"></span><br/> エイム可動角度(上):<input type="text" name="aim_up">度<br/> エイム可動角度(下):<input type="text" name="aim_down">度<br/> エイム可動角度(左右):<input type="text" name="aim_leftright">度<br/> HP:<input type="text" name="hp"><span id="hp_base"></span><br/> EN:<input type="text" name="en"><span id="en_base"></span><br/> 前進速度:<input type="text" name="front_speed">km/h<span id="front_base"></span><br/> 後退速度:<input type="text" name="back_speed">km/h<span id="back_base"></span><br/> } *武装スペック #html2(){ Cannon:<input type="text" name="cannon">個<br/> Barrel:<input type="text" name="barrel">個<br/> 戦車砲用Cannon:<input type="text" name="tank_cannon">個<br/> 榴弾砲用Cannon:<input type="text" name="mortar_cannon">個<br/> Beamer:<input type="text" name="beamer">個<br/> Discharger:<input type="text" name="discharger">個<br/> Launcher(誘導):<input type="text" name="missile_launcher">個<br/> Launcher(無誘導):<input type="text" name="rocket_launcher">個<br/> Sword(ビーム):<input type="text" name="beam_sword">個<br/> Sword(実体):<input type="text" name="material_sword">個<br/> Amp(ソード一つにつき):<input type="text" name="amp">個<br/> Shield:<input type="text" name="shield">個<br/> 武装数:<spam id="weapon_num"></spam><br/> 特殊能力: <label><input type="checkbox" name="skill" value="0">煙幕</label> <label><input type="checkbox" name="skill" value="1">ロックオン補助</label> <label><input type="checkbox" name="skill" value="2">水上浮遊</label> <br/> 特記事項:<spam id="special_comment"></spam><br/> } *審査結果出力 #html2(){ <input type="button" name="check_start" value="審査する!"/> }
*概要 JavaScriptを試すためのページです。 自動予備審査プログラムテスト用 #javascript(){ <script src="https://code.jquery.com/jquery-3.2.1.min.js"></script> <script> //alert("test"); $(function() { //セレクトボックスが切り替わったら発動 $('#base_class').change(function() { if ($(this).val() == "0") { $("#hp_base").html(""); $("#en_base").html(""); $("#front_base").html(""); $("#back_base").html(""); } else if ($(this).val() == "1") { $("#hp_base").html("(基本:660)"); $("#en_base").html("(基本:25)"); $("#front_base").html("(基本:260km/h)"); $("#back_base").html("(基本:180km/h)"); } else if ($(this).val() == "2") { $("#hp_base").html("(基本:780)"); $("#en_base").html("(基本:40)"); $("#front_base").html("(基本:170km/h)"); $("#back_base").html("(基本:130km/h)"); } else if ($(this).val() == "3") { $("#hp_base").html("(基本:1100)"); $("#en_base").html("(基本:120)"); $("#front_base").html("(基本:70km/h)"); $("#back_base").html("(基本:50km/h)"); } else if ($(this).val() == "4") { $("#hp_base").html(" 基本:550"); $("#en_base").html("(基本:45)"); $("#front_base").html("(基本:130km/h)"); $("#back_base").html("(基本:100km/h)"); }});}); </script> } *基本情報 #html2(){ 機体名称:<input type="text" name="tdm_name"><br/> 機体製作者:<input type="text" name="creater_name"><br/> クラス:<select name="base_class" id="base_class"> <option value="0" selected>   </option> <option value="1">軽量型</option> <option value="2">中量型</option> <option value="3">重量型</option> <option value="4">支援型</option> <option value="5">格闘型</option> <option value="6">軽飛行型</option> <option value="7">重飛行型</option> <option value="8">固定翼型</option> </select> } *機体スペック #html2(){ 機体サイズ: <label><input type="radio" name="body_size" value="1">極小</label> <label><input type="radio" name="body_size" value="2">小</label> <label><input type="radio" name="body_size" value="3" checked="checked">中</label> <label><input type="radio" name="body_size" value="4">大</label> <label><input type="radio" name="body_size" value="5">極大</label> <br/> 旋回速度: <label><input type="radio" name="turn_speed" value="1">遅い</label> <label><input type="radio" name="turn_speed" value="2" checked="checked">普通</label> <label><input type="radio" name="turn_speed" value="3">速い</label> <br/> ジャンプ高度:<input type="text" name="jump">m<span id="jump_height"></span><br/> エイム可動角度(上):<input type="text" name="aim_up">度<br/> エイム可動角度(下):<input type="text" name="aim_down">度<br/> エイム可動角度(左右):<input type="text" name="aim_leftright">度<br/> HP:<input type="text" name="hp"><span id="hp_base"></span><br/> EN:<input type="text" name="en"><span id="en_base"></span><br/> 前進速度:<input type="text" name="front_speed">km/h<span id="front_base"></span><br/> 後退速度:<input type="text" name="back_speed">km/h<span id="back_base"></span><br/> } *武装スペック #html2(){ 通常Cannon:<input type="text" name="cannon">個<br/> 戦車砲用Cannon:<input type="text" name="tank_cannon">個<br/> 榴弾砲用Cannon:<input type="text" name="mortar_cannon">個<br/> Barrel:<input type="text" name="barrel">個<br/> Beamer:<input type="text" name="beamer">個<br/> Discharger:<input type="text" name="discharger">個<br/> Launcher(誘導):<input type="text" name="missile_launcher">個<br/> Launcher(無誘導):<input type="text" name="rocket_launcher">個<br/> Sword(ビーム):<input type="text" name="beam_sword">個<br/> Sword(実体):<input type="text" name="material_sword">個<br/> Amp(ソード一つにつき):<input type="text" name="amp">個<br/> Shield:<input type="text" name="shield">個<br/> 武装数:<spam id="weapon_num"></spam><br/> 特殊能力: <label><input type="checkbox" name="skill" value="0">煙幕</label> <label><input type="checkbox" name="skill" value="1">ロックオン補助</label> <label><input type="checkbox" name="skill" value="2">水上浮遊</label> <br/> 特記事項:<spam id="special_comment"></spam><br/> } *審査結果出力 #html2(){ <input type="button" name="check_start" value="審査する!"/> }

表示オプション

横に並べて表示:
変化行の前後のみ表示: