クリックしてコピーします
4540 ワード
<%@ page language="java" pageEncoding="UTF-8"%>
<%@taglib prefix="s" uri="/struts-tags" %>
<script src="<%=request.getContextPath()%>/js/My97DatePicker/WdatePicker.js" type="text/javascript" charset="UTF-8"></script>
<script type="text/javascript">
function copyToClipboard() {
var txt = $("#aflink").val();
if(window.clipboardData) {
window.clipboardData.clearData();
window.clipboardData.setData("Text", txt);
} else if(navigator.userAgent.indexOf("Opera") != -1) {
window.location = txt;
} else if (window.netscape) {
try {
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
} catch (e) {
alert(" , ");
}
var clip = Components.classes['@mozilla.org/widget/clipboard;1'].createInstance(Components.interfaces.nsIClipboard);
if (!clip)
return;
var trans = Components.classes['@mozilla.org/widget/transferable;1'].createInstance(Components.interfaces.nsITransferable);
if (!trans)
return;
trans.addDataFlavor('text/unicode');
var str = new Object();
var len = new Object();
var str = Components.classes["@mozilla.org/supports-string;1"].createInstance(Components.interfaces.nsISupportsString);
var copytext = txt;
str.data = copytext;
trans.setTransferData("text/unicode",str,copytext.length*2);
var clipid = Components.interfaces.nsIClipboard;
if (!clip)
return false;
clip.setData(trans,null,clipid.kGlobalClipboard);
alert(" !")
}
}
</script>
<!-- -->
<div class="top_title"><span class="fr fontsize12"> , , </span><h3> </h3></div>
<div class="level_c">
<div class="collect_record clearfix">
<div class="collect_tit alignright"> </div>
<div class="collect_tit"><s:property value="#request.userInfo.earnedRewards"/></div>
<div class="collect_tit"><a class="und_line"> </a></div>
<div class="collect_tit"><span class="btn"><a class="release" href="/account/gradeRule.do"> </a></span></div>
</div>
<div class="collect_record clearfix">
<div class="collect_tit alignright"> </div>
<div class="collect_tit"><s:property value="#request.userInfo.earnedRewards"/></div>
<div class="collect_tit"><span class="btn2"><a class="release"> </a></span></div>
<div class="collect_tit"><a class="und_line"> </a></div>
</div>
</div>
<div class="collect_c">
<div class="collect_step">
<p>1. 1
<s:if test="#request.taskType == 1">
<b>( )</b>
</s:if>
<s:else>
<b>( )</b>
</s:else>
</p>
</div>
<div class="collect_step">
<p>2. </p>
<div class="collect_copy">
<input type="text" id="aflink" name="aflink" value="http://www.108pub.com/?af=<s:property value="#request.userInfo.userId"/>"/>
<div class="btn"><a class="release" onclick="javascript:copyToClipboard();"> </a></div>
</div>
<div class="clears"></div>
</div>
</div>