⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 edit_parse_data.rhtml

📁 ajax修炼之道源代码。很难下到的。现在奉献给大家。
💻 RHTML
字号:
<!-- ! Excerpted from "Pragmatic Ajax" ! We make no guarantees that this code is fit for any purpose.  ! Visit http://www.pragmaticprogrammer.com/titles/ajax for more book information.--><html>    <head>        <title>Customer Data Screen</title>        <style type="text/css">            th { text-align: left; }        </style>        <%= javascript_include_tag 'controls', 'dragdrop', 'effects', 'prototype' %>                        <%= javascript_tag <<-END            function update_fields(xhr) {                result = xhr.responseText.split(',');                $('address_city').value = result[0];                $('address_state').value = result[1];            }        END        %>            </head>    <body>        <h1>Corporate CRM System</h1>        <h2>Enter Customer Data</h2>                <table>            <tr>                <th>Customer Name:</th>                <td><%= text_field 'address', 'name', {:size => 30} %></td>            </tr>            <tr>                <th>Address:</th>                <td><%= text_field 'address', 'address', {:size => 30} %></td>            </tr>            <tr>                <th>City:</th>                <td><div id="city"><%= text_field 'address', 'city', {:size => 20} %></div></td>            </tr>            <tr>                <th>State:</th>                <td><div id="state"><%= text_field 'address', 'state', {:size => 3, :maxlength => 2} %></div></td>            </tr>                        <tr>                <th>Zip:</th>                                <td>                  <%= text_field 'address',                                 'zip',                                 { :size => 10, :maxlength => 10} %>                </td>                <%= observe_field :address_zip,                                  :url => {                                    :action => 'get_city_state_parse_data'                                  },                                  :with => "'zip=' + value",                                  :complete => 'update_fields(request);'%>            </tr>                        <tr>                <th></th>                <td><%= submit_tag %></td>            </tr>        </table>            </body></html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -