将动态数据添加到 phonegap 插件中
Adding dymatic data into phonegap plugin
我正在尝试将数据动态添加到 phonegap 插件中
<a href="#" onclick="window.plugins.socialsharing.share(
null,
null,
'document.getElementById('setquote').innerHTML;',
null
)">
我曾尝试使用此 document.getElementById('setquote').innerHTML;
将数据导入插件,但没有成功。
我认为您不需要引号:
<a href="#" onclick="window.plugins.socialsharing.share(
null,
null,
document.getElementById('setquote').innerHTML, <- remove quotes here
null
)">
当你将该行用引号引起来时,你只是在传递一个字符串,我想你想传递实际的内部 html
我正在尝试将数据动态添加到 phonegap 插件中
<a href="#" onclick="window.plugins.socialsharing.share(
null,
null,
'document.getElementById('setquote').innerHTML;',
null
)">
我曾尝试使用此 document.getElementById('setquote').innerHTML;
将数据导入插件,但没有成功。
我认为您不需要引号:
<a href="#" onclick="window.plugins.socialsharing.share(
null,
null,
document.getElementById('setquote').innerHTML, <- remove quotes here
null
)">
当你将该行用引号引起来时,你只是在传递一个字符串,我想你想传递实际的内部 html