我想要达到这种效果
点击一下“参加活动”,在“参加活动的会员”下面显示自己的id和用户名
点击一下“参加活动”,在“参加活动的会员”下面显示自己的id和用户名
解决方案 »
- 高分 :用 jQuery 插件 easyUI 实现高级查询,无法获取动态添加行的元素,求教。。。
- javascript问题
- js 本地操作 access 无法添加记录。报错
- 同一个页面,模式窗口下与非模窗口下的结果不同
- 页面刷新的问题(IE6可以,IE5不行)
- 正则表达式?怎样判断输入的只能为数字?
- document.all.editbar._editor 中的 _editor 怎么也找不到,这句话是什么意思(editbar是一个table 的 ID)
- javascipt里处理一个事件要延迟5秒怎么写?
- 同时运动的box,怎么单独控制
- 一个网页先清除再显示的问题
- javascript小问题
- display:block; display:inline-block; 有什么效果 lineheight有没有形象的讲解
<div class="list4">
<ul>
<li>
<p>显示会员id</p>
<p>显示会员姓名</p>
</li>
</ul>
<div class="clear"></div>
</div>
<div class="list5">
<div id="top_btn">
<form method="post" action="$item[url]">
<span><input name="submit" type="button" value="参加活动" onclick="return submit()" /></span>
<input type="hidden" id="uid" name="uid" value="$_SGLOBAL['supe_uid']" />
<input type="hidden" id="username" name="username" value="$_SGLOBAL['supe_uername']" />
</form>
</div>
</div>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Untitled Document</title>
<script type="text/javascript">
/**
* @author: develop_design_level
* @date: 2009-11-03
* @param {Object} id
*/
function $(id){
if(document.getElementById){
return document.getElementById(id);
}else{
return document.all.id;
}
}
function fillDiv(){
if ($('contentDivId').style.display == 'none') {
$('contentDivId').style.display = '';
$('contentDivId').innerHTML = '用户ID:hello_id;用户名称:hello';
}else{
$('contentDivId').style.display = 'none'
}
}
window.onload = function(){
$('btnId').onclick = fillDiv
};
</script>
</head>
<body>
<input type="button" value="参加活动" id="btnId">
<div>参加活动的会员</div>
<div id="contentDivId" style="display:none;"> </div>
</body>
</html>
=== 结贴,给分 ===
得到满意的答案,立即结贴给分,是一种良好的习惯和美德
哦。楼主,我看了你的这些代码,你把button标签放到了一个form表单里面。form表单会跳转离开这个当前页面的,就没法让上面的出现内容了。如果你要让上面的出现你要求的ID和用户名,你就用Ajax来实现吧,无刷新页面。这个你要是没有ajax基础,有点困难哦。
这个可以用这个替换吗?
<ul>
<li>
<p><a href="http://my.my57.com.cn/space.php?uid=$_SGLOBAL['supe_uid']"><img src="<!--{eval echo avatar($_SGLOBAL['supe_uid'], 'small');}-->" ></a></p>
<p><a href="http://my.my57.com.cn/space.php?uid=$_SGLOBAL['supe_uid']">$_SGLOBAL['supe_username']</a></p>
</li>
</ul>
我有一点点基础xmlhttprequest
可是我不会写