A simple way to do this is with a function, defined in the HTML head element of a Web page, that USES the id attributes of HTML elements, as shown in Listing 1.
简单的实现方法是利用一个函数,这个函数在web页面的HTML head元素中定义,它使用HTML元素的id属性进行绑定,如清单1所示。
We also specify that the function will return a VARCHAR (42), which is large enough to hold the concatenated address attributes.
并指定该函数返回一个足以保留连接的地址属性的VARCHAR (42)。
The function gets the attributes from the template as an array named params that is passed to json_encode , which returns a json representation of the PHP associative array.
这个函数会从模板中获取一个名为params的数组属性,同时被传递到json_encode,这个函数会返回json表示的php数组。
应用推荐