質問をすることでしか得られない、回答やアドバイスがある。

15分調べてもわからないことは、質問しよう!

新規登録して質問してみよう
ただいま回答率
85.48%
HTML5

HTML5 (Hyper Text Markup Language、バージョン 5)は、マークアップ言語であるHTMLの第5版です。

JavaScript

JavaScriptは、プログラミング言語のひとつです。ネットスケープコミュニケーションズで開発されました。 開発当初はLiveScriptと呼ばれていましたが、業務提携していたサン・マイクロシステムズが開発したJavaが脚光を浴びていたことから、JavaScriptと改名されました。 動きのあるWebページを作ることを目的に開発されたもので、主要なWebブラウザのほとんどに搭載されています。

Smarty

Smartyは、PHPアプリケーションで使用されるテンプレートエンジンです。

Q&A

0回答

793閲覧

checkタグが反応しない問題について

21120903ryosuke

総合スコア7

HTML5

HTML5 (Hyper Text Markup Language、バージョン 5)は、マークアップ言語であるHTMLの第5版です。

JavaScript

JavaScriptは、プログラミング言語のひとつです。ネットスケープコミュニケーションズで開発されました。 開発当初はLiveScriptと呼ばれていましたが、業務提携していたサン・マイクロシステムズが開発したJavaが脚光を浴びていたことから、JavaScriptと改名されました。 動きのあるWebページを作ることを目的に開発されたもので、主要なWebブラウザのほとんどに搭載されています。

Smarty

Smartyは、PHPアプリケーションで使用されるテンプレートエンジンです。

0グッド

0クリップ

投稿2021/01/18 10:12

編集2021/01/18 10:43

checkタグが反応しない問題について

发送到与订购人资料相同地址。にcheckをつけると
填写订购人资料に記述されている表記が自動で同じ内容として表示されるプログラムを作っていますが反映されません。原因と解決策についてご教授いただけますと幸いです。

js

1function order_customer_copy(frm, errmsg) { 2 var i; 3 var len; 4 var flag; 5 if (frm.sofusaki_same.checked) { 6 // check 7 flag = false; 8 len = frm.so_country_id.length; 9 for (i = 0; i < len; i++) { 10 if (frm.so_country_id.options[i].value == frm.country_id.options[frm.country_id.selectedIndex].value) { 11 flag = true; 12 break; 13 } 14 } 15 if (!flag) { 16 alert(errmsg); 17 frm.sofusaki_same.checked = false; 18 return; 19 } 20 // copy 21 if (frm.order_sex) { 22 if(frm.order_so_sex.length>0){ 23 for (i = 0; i < frm.order_so_sex.length; i++) { 24 if (frm.order_sex[i].checked) { 25 frm.order_so_sex[i].checked = true; 26 break; 27 } 28 } 29 }else{ 30 frm.order_so_sex.value = frm.order_sex.value; 31 } 32 } 33 frm.so_name_sei.value = frm.name_sei.value; 34 frm.so_name_mei.value = frm.name_mei.value; 35 if (frm.so_zip && frm.zip) { 36 frm.so_zip.value = frm.zip.value; 37 } 38 if (frm.so_addr && frm.addr) { 39 frm.so_addr.value = frm.addr.value; 40 } 41 42 if (frm.so_option2 && frm.option2) { 43 frm.so_option2.value = frm.option2.value; 44 }

html

1<!-- ヘッダをインクルード --> 2<{include file='header.tpl' titletag='注文入力画面(注文者・送付先情報の入力)'}> 3 4<div id="main_area"> 5<div id="main_cont"> 6 7<div class="title">填写订购画面</div> 8<br> 9 10<!-- エラーメッセージ --> 11<{if count($errmsg) > 0}> 12<div class="errbox"> 13<{foreach from=$errmsg item=value}><{$value}><br><{/foreach}> 14</div> 15<{/if}> 16<!--// エラーメッセージ --> 17 18订购前,请倾务必确认[<a href="<{$kiyaku_url}>" target="_blank">使用规则</a>]。在订购时,我们会认为已经同意此规则。<br> 19<br> 20 21<!--// カートの中身 --> 22<br> 23 24<form action="<{$order_acturl}>" method="post"> 25<{$order_hidden}> 26 27<b>填写订购人资料</b><br> 28 29<span class="note">*</span>栏为必须填 30<table class="tbl" cellspacing="1" width="100%"> 31<tr> 32<th class="cell_t" width="20%">姓名<span class="note">*</span></th> 33 34<td class="cell_d" width="40%"> 35<input type="text" name="name_sei" class="frm_str" size="14" maxlength="85" value="<{$name_sei}>"></td> 36<td class="cell_d" width="40%"> 37<input type="text" name="name_mei" class="frm_str" size="14" maxlength="85" value="<{$name_mei}>"><span class="note2"></td> 38</tr> 39 40<{if $shop_pref_overseas_omit_flag == "1"}> 41<tr> 42<th class="cell_t">国家名<span class="note">*</span></th> 43 44<td class="cell_d" colspan="2"> 45<input type="hidden" name="ken_id" value="99" id="ken_id"> 46中国 47<select name="country_id" id="country_id" style="display:none"> 48<{html_options options=$so_country_options selected="cn"}> 49</select> 50</td> 51</tr> 52 53<{else}> 54 55<tr> 56<th class="cell_t">省市自治区/国家名<span class="note">*</span></th> 57<td class="cell_d"> 58<!--日本国外の方は都道府県から「日本国外」を選び、国名をお選びください。--><br> 59 60国家名<select name="country_id" class="frm_str" onchange="ken_autoset(this, this.form.ken_id)"> 61<option value="">选择</option> 62<{html_options options=$country_options selected=$country_id}> 63</select>&nbsp; 64 65省市自治区<select name="ken_id" class="frm_str" onchange="country_autoset(this, this.form.country_id)"> 66<option value="">选择</option> 67<{html_options options=$ken_options selected=$ken_id}> 68</select> 69 70</td> 71</tr> 72<{/if}> 73 74<tr> 75<th class="cell_t">邮编号码<span class="note"><!--*--></span><br><span class="note2"><!-- (必须填) --></span></th> 76 77<td class="cell_d" colspan="2"><input type="text" name="zip" class="frm_num" size="10" maxlength="20" value="<{$zip}>"><br><span class="note2">(例:518117)</span> 78</td> 79</tr> 80 81<tr> 82<th class="cell_t">住址 省市自治区/<br>(市区街道村委)<span class="note">*</span></th> 83 84<td class="cell_d"> 85 86地区:(省)<select name="option_2" class="frm_str"> 87<option value="">选择</option> 88 <option value="安徽省">安徽省</option> 89 <option value="福建省">福建省</option> 90</select> 91</td> 92 93<td class="cell_d"> 94<input type="text" name="addr" class="frm_str" size="40" maxlength="85" value="<{$so_addr}>"> 95</td> 96</tr> 97 98<tr> 99<th class="cell_t">电话号码<span class="note">*</span></th> 100 101<td class="cell_d" colspan="2"><input type="text" name="tel" class="frm_num" size="20" maxlength="20" value="<{$tel}>"><br><span class="note2">(例:0755-12345678)</span></td> 102</tr> 103 104<tr> 105<th class="cell_t">邮件地址<span class="note">*</span></th> 106 107<td class="cell_d" colspan="2"> 108<input type="text" name="email" class="frm_num" size="28" maxlength="100" value="<{$email}>"><span class="note2">(半角英文数字)</span><br><span class="note2">(例:xxxxx@example.com) </span></td> 109</tr> 110</table> 111 112<!-- 非会員注文のみ表示 --> 113<{if $order_mode == 'first'}> 114<br> 115 116 117<br> 118<b>收件地址</b> 119<table class="tbl" cellspacing="1" width="100%"> 120<tr><td class="cell_d" colspan="3"> 121<input type="checkbox" name="sofusaki_same" value="1"<{if $sofusaki_same}> checked<{/if}> onclick="order_customer_copy(this.form, '不能发送到国家。')">发送到与订购人资料相同地址。 122</td></tr> 123<tr> 124<th class="cell_t" width="20%">姓名<span class="note">*</span></th> 125 126<td class="cell_d" width="40%"> 127<input type="text" name="name_sei" class="frm_str" size="14" maxlength="85" value="<{$name_sei}>"></td> 128<td class="cell_d" width="40%"> 129<input type="text" name="name_mei" class="frm_str" size="14" maxlength="85" value="<{$name_mei}>"><span class="note2"></td> 130</tr> 131 132<{if $shop_pref_overseas_omit_flag == "1"}> 133<tr> 134<th class="cell_t">国家名<span class="note">*</span></th> 135 136<td class="cell_d" colspan="2"> 137<input type="hidden" name="ken_id" value="99" id="ken_id"> 138中国 139<select name="country_id" id="country_id" style="display:none"> 140<{html_options options=$so_country_options selected="cn"}> 141</select> 142</td> 143</tr> 144 145<{else}> 146 147<tr> 148<th class="cell_t">省市自治区/国家名<span class="note">*</span></th> 149<td class="cell_d"> 150<!--日本国外の方は都道府県から「日本国外」を選び、国名をお選びください。--><br> 151 152国家名<select name="country_id" class="frm_str" onchange="ken_autoset(this, this.form.ken_id)"> 153<option value="">选择</option> 154<{html_options options=$country_options selected=$country_id}> 155</select>&nbsp; 156 157省市自治区<select name="ken_id" class="frm_str" onchange="country_autoset(this, this.form.country_id)"> 158<option value="">选择</option> 159<{html_options options=$ken_options selected=$ken_id}> 160</select> 161 162</td> 163</tr> 164<{/if}> 165 166<tr> 167<th class="cell_t">邮编号码<span class="note"><!--*--></span><br><span class="note2"><!-- (必须填) --></span></th> 168 169<td class="cell_d" colspan="2"><input type="text" name="zip" class="frm_num" size="10" maxlength="20" value="<{$zip}>"><br><span class="note2">(例:518117)</span> 170</td> 171</tr> 172 173<tr> 174<th class="cell_t">住址 省市自治区/<br>(市区街道村委)<span class="note">*</span></th> 175 176<td class="cell_d"> 177 178地区:(省)<select name="option_2" class="frm_str"> 179<option value="">选择</option> 180 <option value="安徽省">安徽省</option> 181 <option value="福建省">福建省</option> 182</select> 183</td> 184 185<td class="cell_d"> 186<input type="text" name="addr" class="frm_str" size="40" maxlength="85" value="<{$so_addr}>"> 187</td> 188</tr> 189 190<tr> 191<th class="cell_t">电话号码<span class="note">*</span></th> 192 193<td class="cell_d" colspan="2"><input type="text" name="tel" class="frm_num" size="20" maxlength="20" value="<{$tel}>"><br><span class="note2">(例:0755-12345678)</span></td> 194</tr> 195 196<tr> 197<th class="cell_t">邮件地址<span class="note">*</span></th> 198 199<td class="cell_d" colspan="2"> 200<input type="text" name="email" class="frm_num" size="28" maxlength="100" value="<{$email}>"><span class="note2">(半角英文数字)</span><br><span class="note2">(例:xxxxx@example.com) </span></td> 201</tr> 202</table> 203 204<br> 205<div align="center"><input type="submit" value="下一页"></div> 206 207</form> 208 209</div><!--// main cont --> 210</div><!--// main area --> 211 212<!-- フッタをインクルード --> 213<{include file='footer.tpl'}> 214 215

気になる質問をクリップする

クリップした質問は、後からいつでもMYページで確認できます。

またクリップした質問に回答があった際、通知やメールを受け取ることができます。

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

m.ts10806

2021/01/18 10:35

Smarty のタグを追加してください
guest

あなたの回答

tips

太字

斜体

打ち消し線

見出し

引用テキストの挿入

コードの挿入

リンクの挿入

リストの挿入

番号リストの挿入

表の挿入

水平線の挿入

プレビュー

まだ回答がついていません

会員登録して回答してみよう

アカウントをお持ちの方は

15分調べてもわからないことは
teratailで質問しよう!

ただいまの回答率
85.48%

質問をまとめることで
思考を整理して素早く解決

テンプレート機能で
簡単に質問をまとめる

質問する

関連した質問