【问题标题】:Social sharing plugin phonegap Share value社交分享插件 phonegap 分享价值
【发布时间】:2015-01-08 21:46:50
【问题描述】:

我想分享来自 textarea 输入值的文本。

这是我的代码:

<textarea type="text" id="source"   tabindex="1" name="source" placeholder="Text to be translated" ></textarea>             

<textarea id="results_body" onfocus="ok=1" cols="100" rows="6" style="height:10%;" ></textarea>

<button onclick="window.plugins.socialsharing.share('textarea value')>share only</button>

【问题讨论】:

  • 问题是什么?如何获取文本区域值?如果有,是哪个文本区域?

标签: javascript html forms cordova social-networking


【解决方案1】:

如果您只想将文本区域值获取到您当前拥有 'textarea value' 的位置,您可以将其替换为

document.getElementById('source').value

share(document.getElementById('source').value)

【讨论】:

  • 谢谢桑福先生,问题解决了,非常感谢
猜你喜欢
  • 1970-01-01
  • 2012-07-29
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2016-07-20
相关资源
最近更新 更多