タグ

ブックマーク / www.openspc2.org (2)

  • エレメントで<input type="text">のみスタイルを変える

    フォームのエレメントは<input>タグで指定します。しかし、<input>タグで指定できるエレメントは数多くあります。その中で特定の種類のエレメントのみにスタイルを適用するにはinput[type="エレメントの種類"]とします。あとは通常のスタイルを設定します。 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN"> <html> <head> <meta http-equiv="content-type" content="text/html;charset=shift_jis"><title>Sample</title> <style type="text/css"><!-- input { color: red; } input[type="text"] { color: orange; } --></style> </head> <b

    hide98
    hide98 2010/04/27
    input全体ではなくてtype="text"のみスタイルを変えるには input[type="text"]とする
  • jQuery 非同期通信を行う

    jQueryでは非同期通信の処理を行うことができます。サーバー上にあるデータを読み込ませるにはload()メソッドを使います。パラメータには読み込むファイルまたはCGIプログラムを指定します。以下のサンプルはサーバー上にあるsample.txtファイルを読み込んで表示します。(サンプルを実行する) <html> <head> <meta http-equiv="content-type" content="text/html;charset=utf-8"> <title>サンプル</title> <style type="text/css"><!-- #mainText { background-color:#ffd; color:red; border:1px solid black; } --></style> <script type="text/javascript" src="j

  • 1