我有一个facebook iframe应用程序,我提供了共享功能.我正在使用此代码:
<script>
function fbs_click()
{
u='<?php echo $shareURL;?>';
t=document.title;
window.open('http://www.facebook.com/sharer.php?u='+encodeURIComponent(u)+'&t='+encodeURIComponent(t),'sharer','toolbar=0,status=0,width=626,height=436');
return false;
}
</script>
<style>
html .fb_share_button {
display: -moz-inline-block; display:inline-block;
padding:1px 20px 0 5px; height:15px; border:1px solid #d8dfea;
background:url(http://b.static.ak.fbcdn.net/rsrc.php/z39E0/hash/ya8q506x.gif)
no-repeat top right;
}
html .fb_share_button:hover {
color:#b5b8d3; border-color:#295582; background:#3b5998
url(http://b.static.ak.fbcdn.net/rsrc.php/z39E0/hash/ya8q506x.gif)
no-repeat top right; text-decoration:none;
}
</style>
<a href="http://www.facebook.com/share.php?u=<url>" class="fb_share_button" onclick="return fbs_click()" target="_blank" style="text-decoration:none;">Share</a>
Run Code Online (Sandbox Code Playgroud)
我面临的问题是,如果我通过你到我的网站url然后内部共享框标题正确显示,但当发布到我的个人资料,点击链接重定向到我的Facebook应用程序之外,我不想要我想要它保留在Facebook页面内.但是,如果我将u参数更改为http://apps.facebook.com/app/之类的内容,那么在共享框中,标题显示为apps.facebook.com,当发布在我的个人资料上时,点击它会重定向我在facebook应用程序中但是在新标签上.
我只想根据传递的值设置标题,如果我在我的个人资料页面上点击它应该保留在Facebook内.
我想从特定网址获取动态内容:
我用过了代码
echo $content=file_get_contents('http://www.punoftheday.com/cgi-bin/arandompun.pl');
Run Code Online (Sandbox Code Playgroud)
我得到以下结果:
document.write('"Bakers have a great knead to make bread."
') document.write('© 1996-2007 Pun of the Day.com
')
Run Code Online (Sandbox Code Playgroud)
我怎么能得到这个字符串 面包师有很大的揉成面包. 只有第一个document.write里面的字符串会改变,其他代码将保持不变
问候,
潘卡
我有一个页面,我在其中提供了一个链接点击,该链接应该重定向到新窗口上的新页面.
我的代码是
<a href="javascript:void(0);" class="webMnu" onclick="window.open('http://abc.com','plain');">Enroll</a>
Run Code Online (Sandbox Code Playgroud)
问题是它在firefox中工作正常(在新选项卡中打开)但在Internet Explorer中它在弹出窗口中打开(不在新选项卡中).
如何在新标签页中打开此新页面?
请帮帮我.
谢谢
潘卡
我正在使用带有布局充气器的gridview来显示带有文本的图标,区别在于我必须在屏幕底部提供一个按钮.我的布局文件如下所示:
<?xml version="1.0" encoding="utf-8"?>
<merge xmlns:android="http://schemas.android.com/apk/res/android">
<GridView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/sdcard" android:layout_width="fill_parent"
android:layout_height="fill_parent" android:verticalSpacing="10dp"
android:horizontalSpacing="10dp" android:numColumns="3"
android:stretchMode="columnWidth" android:gravity="center" android:background="#ffffff"/>
<RelativeLayout android:layout_width="match_parent"
android:layout_height="match_parent">
<Button android:text="submit" android:id="@+id/button"
android:layout_width="fill_parent" android:layout_height="wrap_content"
android:layout_alignParentBottom="true" android:paddingTop="5dp">
</Button>
</RelativeLayout>
</merge>
Run Code Online (Sandbox Code Playgroud)
当我在模拟器上测试它(根据真实设备的大小).网格视图已正确填充,但当我滚动到最后一行时,图像可见,但文本和按钮不会阻碍视图.我希望文本也可见.我怎样才能做到这一点?
