This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> | |
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script> | |
<script src="./js/checkdate.js"></script> | |
</head> | |
<body> | |
<form action="xxx.do"> | |
<select id="year"> | |
<option>2013</option> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(function() { | |
// 1.現在日付(時分秒はゼロにセットする)を得る | |
var now = new Date(); | |
now = new Date(now.getFullYear(), now.getMonth(), now.getDate()); | |
// 2.フォームで指定された日付を得る | |
var year = $("#year"); | |
var month = $("#month"); | |
var day = $("#day"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html:text property="address" styleId="address_id"/> | |
(生成されるhtmlコード) | |
<input type="text" name="address" id="address_id"/> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
JSP version: <%= JspFactory.getDefaultFactory().getEngineInfo().getSpecificationVersion() %><br> | |
Servlet Specification: <%= application.getMajorVersion() %>.<%= application.getMinorVersion() %><br> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<c:choose> | |
<c:when test="${someObj.strStatus == '0'}"> | |
<!-- someObj.strStatusの値が0の時--> | |
ステータスは0(無効)です。 | |
</c:when> | |
<c:otherwise> | |
<!-- someObj.strStatusの値が0ではない時--> | |
ステータスは<bean:write name="someObj" property="strStatus"/>0以外(有効)です。 | |
</c:otherwise> | |
</c:choose> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// リクエストボディの文字コードを特定のコード(ここではShift_JIS)に指定 | |
request.setCharacterEncoding("Shift_JIS"); | |
// レスポンス(サーバの出力文字列)の文字コードとレスポンスヘッダを特定のコード(ここではShift_JISに指定) | |
response.setContentType("text/html; charset=Shift_JIS"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.io.*; | |
import javax.servlet.*; | |
import javax.servlet.http.*; | |
public class CharacterEncodingFilter implements Filter { | |
private String encoding = null; | |
// このクラスが初めて実行される時のみ一度だけコールされるメソッド。初期化に使う。 | |
// マルチスレッドの環境においては、最初のスレッドがこのクラスを呼び出した時のみ実行される。 | |
@Override |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- フィルタ名とそのクラスを指定し、初期化に使うパラメータもinit-paramタグで指定する --> | |
<filter> | |
<filter-name>Character Encoding</filter-name> | |
<filter-class>mysedlf.filter.CharacterEncoding</filter-class> | |
<init-param> | |
<param-name>encoding</param-name> | |
<param-value>Shift_JIS</param-value> | |
</init-param> | |
</filter> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script> | |
<script src="https://raw.githubusercontent.com/padolsey/jquery.fn/master/cross-domain-ajax/jquery.xdomainajax.js"></script> | |
<script type="text/javascript"> | |
var uri = 'http://example.xxx'; // 取得対象のURIを指定 | |
$.get(uri, function(res){ | |
// 取得したデータのbodyタグの中身を抜き出す。 | |
var body = $(res.responseText).find('body').text() ; | |
alert(body); | |
}); | |
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
' 途中に空白のセルがあった場合でも最下セルを選択できる方法。 | |
' 1行目から探索する方法ではなく、Excelシートの定義上の最下行("A65535")から上に遡る方法を使う。 | |
' 例ではx列(xには任意の列番を指定)で値が入っている最下セルの一つ下のセルを選択する | |
Dim x As Integer | |
x = 2 ' 2列目をターゲットにする | |
Range("A65535", x).End(xlUp).Offset(1, 0).Activate |
OlderNewer