前提・実現したいこと
AWS(Amazonクラウド)のS3では、jQueryのdatepickerを利用して、カレンダー入力したい。
ローカルPCで作成した*.htmlファイルをダブルクリックすると、正しくカレンダーが機能します。
同じソースをS3にアップロードした所、機能しない。
発生している問題・エラーメッセージ
エラーメッセージ
日付入力欄にフォーカスしても、何も起きない。(カレンダーがでない)
もっとも、デフォルト日付が機能しない。
該当のソースコード
Amazon S3/iquerytaketest/html/jquery.htmlに以下ソースを配備。
javascript
1<!DOCTYPE html> 2<html lang="ja"> 3 <head> 4 <meta http-equiv="Content-Type" content="text/html; charset=Shift_JIS"> 5 <title>jQuery Datepicker</title> 6 <link rel="stylesheet" href="http://code.jquery.com/ui/1.9.2/themes/base/jquery-ui.css" /> 7 <script src="http://code.jquery.com/jquery-1.8.3.js"></script> 8 <script src="http://code.jquery.com/ui/1.9.2/jquery-ui.js"></script> 9 <script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1/i18n/jquery.ui.datepicker-ja.min.js"></script> 10 <link rel="stylesheet" href="/demos/style.css" /> 11 <script> 12 $(function() { 13 $.datepicker.setDefaults( $.datepicker.regional[ "ja" ] ); 14 $("#datepicker1").datepicker({ 15 dateFormat: "yy/mm/dd" 16 }); 17 $("#datepicker1").datepicker("setDate", new Date()); 18 }); 19 </script> 20 </head> 21 <body> 22 <h1>jQuery Datepicker13</h1> 23 <form name="test"> 24 <input type="text" name="demo" id="datepicker1"></br> 25 </form> 26 </body> 27</html>
試したこと
1)jqueryを動かすために、ファイルを配備せず「<script src="http://code.jquery.com/jquery-1.8.3.js"></script>」など
外部リンクを読んでいるのが良くないかと想像した。
もちろん、S3のファイルを公開しない画面すら出てこないので、公開する、を押した。(画面はでるがdatepickerは機能しない)
何かAWS側で設定がいるのでは、予想するが良くわからなかった。
回答1件
あなたの回答
tips
プレビュー