jquery SPGetCurrentUser()获取sharepoint 2007中当前登录的用户名

问题描述:

我想使用jquery获取当前登录的用户名并将用户信息传递给可连接的webpart。
这是我在CEWP中写的。

I would like to use jquery to get the current logged in username and pass the user information to the connectible webpart. This is what I have written in CEWP.

<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js">
</script>
<script type="text/javascript">           
    $(document).ready(function() {
        var thisUserAccount = $().SPServices.SPGetCurrentUser({
    fieldName: "Name",
    debug: false
});
alert(thisUserAccount);


 }    

    ); 

</script>      

但没有任何影响。我也没有看到来自警报的任何输出。我做错了什么?有没有更好的方法呢?

but nothing is hapening. I dont see any output from alert also. am I doing anything wrong? Is there any better way of doing it?

提前致谢。

<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js">
</script>

<script type="text/javascript"> 
    var thisUserAccount ;          
    $(document).ready(function() {
    thisUserAccount= $().SPServices.SPGetCurrentUser({
    fieldName: "Title",
    debug: false
});
</script>