hỗ trợ JavaScript kịch bản bằng cách cho phép bạn nhúng một đoạn mã JavaScript vào các hình thức HTML trong thẻ, và sau đó kêu gọi các kịch bản bằng cách sử dụng kịch bản tham số để phương pháp START_HTML. Sau đó, bạn có thể gọi các chức năng JavaScript cho phù hợp với các yếu tố hình thức. | Chapter 10 Using JavaScript Features PERL IN A NUTSHELL 41 PREVIOUS Chapter 10 The Module NEXT Using JavaScript Features supports JavaScript scripting by allowing you to embed a JavaScript script into the HTML form within SCRIPT tags and then calling the script using the - script parameter to the start_html method. You can then call the JavaScript functions as appropriate to the form elements. PREVIOUS Named Parameters NOME BOOK INDEX NEXT Debugging Library Home Perl in a Nutshell Learning Perl Learning Perl on Win32 Programming Perl Advanced Perl Programming Perl Cookbook http documents oreilly perl perlnut 2 7 2001 10 35 34 PM Chapter 10 Debugging IN A NUTSHELL 41 PREVIOUS Chapter 10 The Module NEXT Debugging A complication of writing CGI scripts is that when debugging the script you have to wrestle with the web server environment. provides support for debugging the script on the command line. If you run the script on the command line without arguments you will be placed into an offline mode in which name-value pairs can be entered one-by-one. When you press CTRL-D the script runs. For example birthday offline mode enter name value pairs on standard input birthday 6 4 65 d Content-type text html P Your birthday is 6 4 65. P You can also supply the name value parameters directly on the command line. For example test birthday 6 4 65 Content-type text html P Your birthday is 6 4 65. P Multiple values can be separated by spaces as separate arguments on the command line or by ampersands as in URL-encoded syntax . In fact you can use URL-encoded syntax on the command line. This makes it easy to supply raw CGI input to the script for testing purposes. Just remember to protect the ampersand from the shell. test Ibirthday 6 2f4 2f65 name Fred 20FlintstoneI Content-type text html P Fred Flintstone your birthday is 6 4 65. P PREVIOUS NOME NEXT Using .