| 1 | #!/usr/bin/perl |
|---|
| 2 | |
|---|
| 3 | print "Content-Type: text/html; charset=Windows-1251\n"; |
|---|
| 4 | print "Cache-control: private\n"; |
|---|
| 5 | print "\n"; |
|---|
| 6 | |
|---|
| 7 | print << "EOL"; |
|---|
| 8 | <html> |
|---|
| 9 | <head> |
|---|
| 10 | <script language='javascript' src='jquery-1.2.6.js'></script> |
|---|
| 11 | </head> |
|---|
| 12 | <body> |
|---|
| 13 | <form> |
|---|
| 14 | <input type='text' name='x' id='x'> |
|---|
| 15 | <input type='submit'> |
|---|
| 16 | <a href="javascript:putRussianFLetter()">Put Russian F letter</a> |
|---|
| 17 | </form> |
|---|
| 18 | $ENV{'QUERY_STRING'} |
|---|
| 19 | <button onclick='doClick()'>JQ</button> |
|---|
| 20 | <script language='javascript'> |
|---|
| 21 | function doClick() { |
|---|
| 22 | \$.get('test.cgi', {x:\$('#x')[0].value, anticache:Math.random()}, |
|---|
| 23 | function( data ){\$('#out').html(data);}); |
|---|
| 24 | } |
|---|
| 25 | function putRussianFLetter() { |
|---|
| 26 | \$('#x')[0].value = '\\u0424'; |
|---|
| 27 | } |
|---|
| 28 | </script> |
|---|
| 29 | <div id='out'></div> |
|---|
| 30 | </body> |
|---|
| 31 | </html> |
|---|
| 32 | EOL |
|---|
| 33 | |
|---|