2017-04-17 20 views
0

私は(PhoneGapのプロジェクトのための)innerHTMLのonclick-eventとinnerHTMLのオプションを組み合わせる方法は?

ボタン

<button onclick="window.plugins.socialsharing.share('Message, image and link', null, 'https://www.adsf.org/logo.png', 'http://www.adsf.org')">message, image and link</button> 

にonclickの機能とボタンを組み合わせたいしかし、どのようにinnerHTMLプロパティに使用するには?

$(".ergebnisSkill").append('<!-- HERE MY BUTTON?? -->'); 

私は一度だけこれら二つのことをどのように組み合わせるか""''

を使用することができますか?

+0

\を置くことによって、エスケープ引用符で試してみてくださいエスケープする必要があります。 –

答えて

0

あなたは 'は、フロントそれの

$(".ergebnisSkill").append('<button onclick="window.plugins.socialsharing.share(\'Message, image and link\', null, \'https://www.adsf.org/logo.png\', \'http://www.adsf.org\')">message, image and link</button>'); 
関連する問題