我知道这是一个非常简单的问题,我想知道如何将 html 块作为参数传递给函数并在页面加载的那一刻调用该函数。
<body>
<section data-role="page" data-theme="ams">
<section data-role="header" id="content">
<h1>header ssssssssssssssssssssssssssssss sssssssssssssssssssssss ssssssssssssssssssssssssss ssssssssssssssss ssssssssssss</h1>
</section>
<section data-role="conents" >
<p>loruim epsum haha </p>\n<p>hehe told u </p>\n<ol class=\"starpasspro-upper-alpha_ol\">\n<li>gasdfg</li>\n<li>sdfffasd</li>\n<li>asdfffasdf</li>\n<li>asdfasdfasdfasd</li>\n</ol>\n\n<table class=\"table_with_header lsm-tableclass-styles\">\n<tbody>\n<tr>\n<td class=\"lsm_table_heading_1\">Description</td>\n<td class=\"lsm_table_heading_1\">Amount</td>\n</tr>\n<tr>\n<td>Gross salary</td>\n<td> xxxx</td>\n</tr>\n<tr>\n<td>Less: income tax (£35,000 x 25%)</td>\n<td> xxxx</td>\n</tr>\n<tr>\n<td>Less: social security tax (£50,000 x 9%)</td>\n<td> xxxx</td>\n</tr>\n<tr>\n<td>Net earnings</td>\n<td> xxxx</td>\n</tr>\n<tr>\n<td>Employer’s contribution on social security<br>(£50,000 x10.5%)</td>\n<td> xxxx</td>\n</tr>\n</tbody>\n</table>\n\n
<p><span data-lscp-resource-mimetype=\"image/png\" data-lscp-resource-id=\"51e8db617607942807000032\"></span></p>
</section>
<section data-role="footer">
<p>footer</p>
</section>
</section>
我想将以下 html 块作为参数传递给我的函数
<p>loruim epsum haha </p>\n<p>hehe told u </p>\n<ol class=\"starpasspro-upper-alpha_ol\">\n<li>gasdfg</li>\n<li>sdfffasd</li>\n<li>asdfffasdf</li>\n<li>asdfasdfasdfasd</li>\n</ol>\n\n<table class=\"table_with_header lsm-tableclass-styles\">\n<tbody>\n<tr>\n<td class=\"lsm_table_heading_1\">Description</td>\n<td class=\"lsm_table_heading_1\">Amount</td>\n</tr>\n<tr>\n<td>Gross salary</td>\n<td> xxxx</td>\n</tr>\n<tr>\n<td>Less: income tax (£35,000 x 25%)</td>\n<td> xxxx</td>\n</tr>\n<tr>\n<td>Less: social security tax (£50,000 x 9%)</td>\n<td> xxxx</td>\n</tr>\n<tr>\n<td>Net earnings</td>\n<td> xxxx</td>\n</tr>\n<tr>\n<td>Employer’s contribution on social security<br>(£50,000 x10.5%)</td>\n<td> xxxx</td>\n</tr>\n</tbody>\n</table>\n\n
<p><span data-lscp-resource-mimetype=\"image/png\" data-lscp-resource-id=\"51e8db617607942807000032\"></span></p>
知道怎么做吗?
请注意,这有 jquery 移动结构