用onmousemove做拖拽时要注意iframe。

用onmousemove做拖拽时要注意iframe,在鼠标经过iframe时,鼠标就会失去控制。

解决方法是:写个position:absolute层在onmousedown时遮盖页面,onmouseup时隐藏。还要注意在IE下该层要添加一个透明的背景图片,不然还是遮不住iframe。

拖拽需要三个方法,onmousedown,document.onmousemove,document.onmouseup。

rpxnow.com的OpenID托管服务

RPX提供了OpenID的托管服务,你所要做的,只是在网页中插入几行代码,剩下的全部由它来完成。

但是RPX提供的PHP示例代码,我想很多人未必会用,写的有点菜,我就没有用的起来。下面是我自己写的一个示例代码,供大家学习:)


<script src="https://rpxnow.com/openid/v2/widget"
type="text/javascript"></script>
<script type="text/javascript">
RPXNOW.token_url = "http://freebapp.org/tools/openid/rpx.php";
RPXNOW.realm = "freebapp";
RPXNOW.overlay = true;
RPXNOW.language_preference = 'en';
</script>

<?php
if(!empty($_REQUEST['token'])){
$post['token'] = $_REQUEST['token'];
$post['apiKey'] = 'a21e795ea614c12f549660ab15f93de30451d338';
$post['format'] = 'json';

$curl = curl_init();
$url = 'https://rpxnow.com/api/v2/auth_info?token_url='.urlencode('http://freebapp.org/tools/openid/rpx.php');
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, FALSE);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_HEADER, 0);
curl_setopt($curl, CURLOPT_POST, 1);
curl_setopt($curl, CURLOPT_POSTFIELDS, $post);
curl_setopt($curl, CURLOPT_URL, $url);

$data = curl_exec($curl);
echo('<pre>');
print_r(json_decode($data));
echo('</pre>');
curl_close($curl);
}
?>

大家把上例的apiKey和token_url换成自己的就可以了!

示例演示

Yesterday evening

Yesterday evening, before hitting the asphalt back home, I visited the AH store beneath the parking-lot, where these two young people, armed with a video-camera and blossoming smiles, tried to capture passers-by.
Normally I would prefer having my head chopped off before … errr … .
She didn’t have any pigtails, but … well … you know, there was a welcoming sight – countenance and appearance!
She did have that kind of ‘Lonneke Engel’ pinnule and posture. Not at all that perfect, so perchance even more graceful!

Reflecting on the subject I told them I really wasn’t the man they wanted. They acceded this truth quickly enough but we kept chatting for a while – both guy and girl very relaxed, noticeably enjoying their little project.

They probably have wiped this Ugly Faustus Face already, for all that