なんとなく思いついて試したらイケたけどなんかひどい。
<form action="java.html" method="post"> <noscript> </form> <form action="nojava.html" method="post"> </noscript> <input name="test"> <input type="submit"> </form>
実用には向かないだろうな
JavaScriptが有効な場合にJSで書き換えてあげる方法
現実的だった。
<form action="nojava.html" method="post" id="form1"> <input name="test"> <input type="submit"> </form> <script type="text/javascript">document.getElementById('form1').action='java.html';</script>
あー
これもいいのか
<script> document.write('<form action="java.html" method="post">'); </script> <noscript> <form action="nojava.html" method="post"> </noscript> <input name="test"> <input type="submit"> </form>
functionをつくればスッキリするかも
<script> function newForm(action, method) { document.write('<form action="'+action+'" method="'+method+'">'); } </script> <script>newForm('java.html', 'post');</script> <noscript><form action="nojava.html" method="post"></noscript> <input name="test"> <input type="submit"> </form>