_ JavaScriptでフォームのクリア Strutsで開発してる際に,入力チェックなどで元の画面に遷移した場合,フォームのvalueに値が入った状態で表示される.通常入力された値に関してはフォームのリセットボタンでクリアが可能ですが,valueに値が書かれてしまっている場合は,それをクリアすることができません.仕方がないので,この部分に関してはJavaScriptでクリアするように実装することにしました. …が,Strutsでは<html:form>タグを使ってformのJSP上に定義をしているためにname属性を指定すると,JSPコンパイルエラーで表示ができない.というわけで,formname.fieldname.value=''といった感じではフォームの値をクリアできないことが判明.明示的に名前を指定してフォームを特定する以外に方法はないかとGoogleで検索してみると,他にもやり