Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/jquery/84.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript 通过Ajax调用将twitter follow按钮添加到页面_Javascript_Jquery_Ajax_Asp.net Mvc 4_Twitter - Fatal编程技术网

Javascript 通过Ajax调用将twitter follow按钮添加到页面

Javascript 通过Ajax调用将twitter follow按钮添加到页面,javascript,jquery,ajax,asp.net-mvc-4,twitter,Javascript,Jquery,Ajax,Asp.net Mvc 4,Twitter,我的Ajax调用正在生成以下html,该html创建了一个twitter follow按钮,并将其附加到页面上的一个div中 <a href="https://twitter.com/@Model.TwitterName" id='followbutton' class="twitter-follow-button" data-show-count="true" data-size="medium">Follow @@@Model.TwitterName</a> 我

我的Ajax调用正在生成以下html,该html创建了一个twitter follow按钮,并将其附加到页面上的一个div中

<a href="https://twitter.com/@Model.TwitterName" id='followbutton' class="twitter-follow-button" data-show-count="true" data-size="medium">Follow @@@Model.TwitterName</a>

我不知道如何让twitter小部件脚本用于附加内容。如果在加载DOM时代码就在那里,那么它就可以工作

twttr.widgets.load()
重新加载页面上html的脚本

<a href="https://twitter.com/@Model.TwitterName" id='followbutton' class="twitter-follow-button" data-show-count="true" data-size="medium">Follow @@@Model.TwitterName</a>