Click here to Skip to main content
15,916,432 members

creend - Professional Profile



Summary

    Blog RSS
45
Authority
-22
Debator
0
Enquirer
32
Organiser
389
Participant
0
Author
0
Editor
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Reputation

Weekly Data. Recent events may not appear immediately. For information on Reputation please see the FAQ.

Privileges

Members need to achieve at least one of the given member levels in the given reputation categories in order to perform a given action. For example, to store personal files in your account area you will need to achieve Platinum level in either the Author or Authority category. The "If Owner" column means that owners of an item automatically have the privilege. The member types column lists member types who gain the privilege regardless of their reputation level.

ActionAuthorAuthorityDebatorEditorEnquirerOrganiserParticipantIf OwnerMember Types
Have no restrictions on voting frequencysilversilversilversilver
Bypass spam checks when posting contentsilversilversilversilversilversilvergoldSubEditor, Mentor, Protector, Editor
Store personal files in your account areaplatinumplatinumSubEditor, Editor
Have live hyperlinks in your profilebronzebronzebronzebronzebronzebronzesilverSubEditor, Protector, Editor
Have the ability to include a biography in your profilebronzebronzebronzebronzebronzebronzesilverSubEditor, Protector, Editor
Edit a Question in Q&AsilversilversilversilverYesSubEditor, Protector, Editor
Edit an Answer in Q&AsilversilversilversilverYesSubEditor, Protector, Editor
Delete a Question in Q&AYesSubEditor, Protector, Editor
Delete an Answer in Q&AYesSubEditor, Protector, Editor
Report an ArticlesilversilversilversilverSubEditor, Mentor, Protector, Editor
Approve/Disapprove a pending ArticlegoldgoldgoldgoldSubEditor, Mentor, Protector, Editor
Edit other members' articlesSubEditor, Protector, Editor
Create an article without requiring moderationplatinumSubEditor, Mentor, Protector, Editor
Approve/Disapprove a pending QuestionProtector
Approve/Disapprove a pending AnswerProtector
Report a forum messagesilversilverbronzeProtector, Editor
Approve/Disapprove a pending Forum MessageProtector
Have the ability to send direct emails to members in the forumsProtector
Create a new tagsilversilversilversilver
Modify a tagsilversilversilversilver

Actions with a green tick can be performed by this member.


 
GeneralSpringGraphRoamer Pin
creend17-Nov-11 20:06
creend17-Nov-11 20:06 
Generalencoding2 Pin
creend9-Feb-11 21:07
creend9-Feb-11 21:07 
Generalencoding Pin
creend9-Feb-11 16:16
creend9-Feb-11 16:16 
Generalwindow.open post Pin
creend5-Jul-10 22:29
creend5-Jul-10 22:29 
Generalsc Pin
creend3-Nov-09 19:40
creend3-Nov-09 19:40 
GeneralRe: sc Pin
creend28-Jan-10 16:38
creend28-Jan-10 16:38 
GeneralTJ2R3-WHW22-B848T-B78YJ-HHJWJ Pin
creend9-Sep-09 21:32
creend9-Sep-09 21:32 
Generalhttp://go2.microsoft.com/fwlink/?LinkID=87096&errorID=1603&component=dev Pin
creend26-Jul-09 19:43
creend26-Jul-09 19:43 
GeneralAboutScript Pin
creend1-Jul-09 23:16
creend1-Jul-09 23:16 
<html>
<head>
<title>手机抽奖</title>
<meta http-equiv="Content-Type" content="text/html; charset=GBK">
<META HTTP-EQUIV="Pragma" CONTENT="no-cache">
<META HTTP-EQUIV="Cache-Control" CONTENT="no-cache">
<META HTTP-EQUIV="Expires" CONTENT="0">
<script language="javascript">
//摇奖开关
flag=2;

mobile = new Array();
//将数组载入改为字符串载入,考虑效率问题
mobile[0]="13824142543";
mobile[1]="13584565115";
mobile[2]="13655498155";
mobile[3]="13498756413";
mobile[4]="13574569820";
mobile[5]="13645455921";
mobile[6]="13843333234";
mobile[7]="13699836754";
mobile[8]="13556398521";
mobile[9]="13633398454";
mobile[10]="13866941215";
mobile[11]="13621234593";
mobile[12]="13888455451";
mobile[13]="13633321505";
mobile[14]="13699845444";
mobile[15]="13635454125";
mobile[16]="13826544543";
mobile[17]="13699858777";
mobile[18]="13635897443";
mobile[19]="13866000325";

//选择抽几等奖
function changeGrade(){
 document.mainform.number.value="";
 document.mainform.number.focus();
}

//清除已中奖记录,重新抽奖初始化
function repeat(){
 //删除已中奖名单,重新开始抽奖
 if(confirm("您确定清除已抽奖结果,重新开始抽奖吗?")){  
  zstable = document.getElementById("zs");
  rows = zstable.rows.length;
  for(i=rows-1;i>0;i--){
   zstable.deleteRow(i);
  }
  document.mainform.zjmobile.value = "";
  init();
 }else{
  ;
 }
}

//抽奖机
function startLottery() {
    size = mobile.length;
    n = size - 1;
 if (flag==1) {
  var tmp = Math.round(Math.random()*n);
  cj.rows(0).cells(0).innerHTML="<div id='mbl' align='center' valign='bottom'><font size='5' color='red'><b>"+mobile[tmp]+"</font></div>";
  setTimeout("startLottery()",100);
 }
}
//开始抽奖第一步
function initLottery() {
 if(document.mainform.number.value==""){
  alert("请填入中奖名额");
  document.mainform.number.focus();
  return false;
 }
 if (flag==2) {
  flag=1;
  document.getElementById("bgn").style.display="none";
  document.getElementById("end").style.display="";
  document.getElementById("ctn").style.display="none";
  document.mainform.init.disabled=false;
  startLottery(); 
 }
}

//单刀双置式抽奖
function stopLottery(){
 if(flag==0){//开始
  if(document.mainform.number.value==""){
   alert("请填入中奖名额");
   document.mainform.number.focus();
   return false;
  }
     if(isBeyongNumber()){//超过中奖名额
      alert("该奖项中奖名额已满!");
      return false;
     }
     if(mobile.length==0){
      alert("所有参与手机均中奖,无手机可参与抽奖!");
      return false;
     }
  flag=1;
  document.getElementById("bgn").style.display="none";
  document.getElementById("end").style.display="";
  document.getElementById("ctn").style.display="none";
  startLottery();
 }else {//停止
  flag=0;
  document.getElementById("bgn").style.display="none";
  document.getElementById("end").style.display="none";
  document.getElementById("ctn").style.display="";
  innerMobile(document.getElementById("mbl").innerText);  
  
  //此处需要在下次抽奖前,剔除已中奖手机号。
  clearLot(document.getElementById("mbl").innerText);
  
 }
}

//插入中奖手机到展示区
function innerMobile(mobile){
   
 //得到中奖等级 
 var index = document.mainform.grade.selectedIndex;
 var grade = document.mainform.grade[index].value;
 var gradeCn = document.mainform.grade[index].text;
 
 //插入展示区
 var newrow = document.getElementById("zs").insertRow(-1);//新增一行
 newrow.id = "tr"+grade;
 var newcell = newrow.insertCell(0);//新增单元格
 newcell.innerHTML=gradeCn+"等奖";//填入单元格内容
 newcell = newrow.insertCell(1);//新增单元格
 newcell.innerHTML=mobile;//填入单元格内容
 
 //加入手机串到隐藏值
 document.mainform.zjmobile.value += grade + "-" + mobile + ","; 
}

//检查已中奖数是否超过中奖名额
function isBeyongNumber(){
 var index = document.mainform.grade.selectedIndex;
 var grade = document.mainform.grade[index].value;
 
 var number = document.mainform.number.value;//抽奖名额总数
 var size = document.getElementsByName("tr"+grade).length;//已中奖名额
 if(size>=number){
  return true;
 }else{
  return false;
 }
}

/*****按回车键开始停止抽奖,方便用户操作,备用
function keyDown()
{
 var keycode= event.keyCode;
 var realkey = String.fromCharCode(event.keyCode);
 if(event.keyCode==13){
  if(flag==0){
   flag=1;
   document.getElementById("bgn").style.display="none";
   document.getElementById("end").style.display="";
   document.getElementById("ctn").style.display="none";
   startLottery();
  }else {
   flag=0;
   document.getElementById("bgn").style.display="none";
   document.getElementById("end").style.display="none";
   document.getElementById("ctn").style.display="";
  }
 }
}
document.onkeydown=keyDown;
*/


//剔除已中奖号码,使用此方法时,允许参与手机号中有重复手机号存在
//若要不允许参与手机号中有重复手机号存在,每次只减1,需要java类查询时唯一
function clearLot(lotmobile){
 size = mobile.length;
 //alert("before="+mobile.length);
 tmp = new Array();
 j = 0;
 for(i=0;i<size;i++){
  if(mobile[i]!=lotmobile){
    tmp[j]=mobile[i];
    j++;
  }
 }
 mobile = tmp;
 //alert("after="+mobile.length);
}

</script>
</head>
<body text="#666666" leftmargin="0" topmargin="13" marginwidth="0" marginheight="0">
<center>
  <table width="100%" height="300" cellpadding="0" cellspacing="0">
    <tr>
      <td align="center" valign="top" >
       <table width="100%" height="60" cellpadding="0" cellspacing="0" bgcolor="#F1F1F1" style="border-top:1 solid white">
       </table>
        <table width="100%" height="30" cellpadding="0" cellspacing="0">
          <tr>
            <td align="center">&nbsp;&nbsp; <font color="#999999">手机抽奖演示</font></td>
          </tr>
        </table>
        <form method="post" action="" name="mainform">
        <!-- 中奖手机串-->
        <input type="hidden" name="zjmobile" value="">
          <table width="50%" cellspacing="1" cellpadding="2" id="tb1">
            <tr>
     <td align="left">即将抽出:
     <select name="grade" onChange="changeGrade()">
     <option value="1">一</option>
     <option value="2">二</option>
     <option value="3">三</option>
     </select>等奖
     <input type="text" name="number" value="" size="2" onKeypress="if (event.keyCode < 45 || event.keyCode > 57) event.returnValue = false;">名&nbsp;&nbsp;(此处只允许输入数字)
     <input type="button" name="init" value="重新抽奖" onclick="repeat()"><!--重新抽奖-->
     </td>    
            </tr>
             <tr>
     <td align="left">&nbsp;
     </td>    
            </tr>
           </table>
          <table width="90%" cellspacing="1" cellpadding="2" id="tb2">
            <tr>
     <td align="center">
     <div id="bgn" style="display:''"><input type="button" name="start" value="开始" onclick="initLottery()"></div>      
     <div id="end" style="display:none"><input type="button" name="stop" value="停止" onclick="stopLottery()"></div>
     <div id="ctn" style="display:none"><input type="button" name="stop" value="开始" onclick="stopLottery()"></div>
     </td>
            </tr>
          </table><br>
          <center>
          <table width="50%" border="1" cellspacing="0" cellpadding="0" id="cj" style="border-color:blue">
   <tr>
    <td height="60">
    </td>
   </tr>
    </table>
          </center><br><br>
          <CENTER>
          <table width="60%" cellspacing="1" cellpadding="2" bgcolor="#99CCFF" id="zs" align="center">
            <tr>
     <td colspan="2"><B>抽奖进度显示:
     </td>    
            </tr>
          </table>
          </CENTER>    
          </table>
        </form></td>
    </tr>
  </table>
<script>
//载入时先初始化奖项,重新抽奖按钮屏蔽
changeGrade();
document.mainform.init.disabled=true;
</script>
</center>
</body>
</html>

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>无标题文档</title>
</head>

<BODY STYLE="FONT-SIZE: 10pt; FONT-FAMILY: Verdana, Arial, Helvetica">

<SCRIPT LANGUAGE="JScript">

var NUMBER_OF_REPETITIONS = 40;
var nRepetitions = 0;
var g_oTimer = null;

function startLongProcess()
{
   divProgressDialog.style.display = "";
   resizeModal();
   btnCancel.focus();

   // Add a resize handler for the window
   window.onresize = resizeModal;

   // Add a warning in case anyone tries to navigate away or refresh the page
   window.onbeforeunload = showWarning;

   //
   // Here's where you would normally kick off a long asynchronous process
   // like a file download or a remote database operation. Here, we use
   // our "long process" to simulate this process.
   //

   continueLongProcess();
}

function updateProgress(nNewPercent)
{
   // Update our pseudo progress bar
   divProgressInner.style.width = (parseInt(divProgressOuter.style.width) 
      * nNewPercent / 100)+ "px";
}

function stopLongProcess()
{
   if (g_oTimer != null)
   {
      // Clear the timer so we don't get called back an extra time
      window.clearTimeout(g_oTimer);
      g_oTimer = null;
   }

   // Hide the fake modal DIV
   divModal.style.width = "0px";
   divModal.style.height = "0px";
   divProgressDialog.style.display = "none";

   // Remove our event handlers
   window.onresize = null;
   window.onbeforeunload = null;

   nRepetitions = 0;
}

function continueLongProcess()
{
   if (nRepetitions < NUMBER_OF_REPETITIONS)
   {
      // Set the timeout somewhere between 0 and .25 seconds
      var nTimeoutLength = Math.random() * 250;
      updateProgress(100 * nRepetitions / NUMBER_OF_REPETITIONS);

      g_oTimer = window.setTimeout("continueLongProcess();", nTimeoutLength);
      nRepetitions++;
   }
   else
   {
      stopLongProcess();
   }
}

function showWarning()
{
   //Warn users before they refresh the page or navigate away
   return "Navigating to a different page or refreshing the window could cause you to lose precious data.\n\nAre you*absolutely* certain you want to do this?";
}

function resizeModal()
{
   // Resize the DIV which fakes the modality of the dialog DIV
   divModal.style.width = document.body.scrollWidth;
   divModal.style.height = document.body.scrollHeight;

   // Re-center the dialog DIV
   divProgressDialog.style.left = ((document.body.offsetWidth - 
divProgressDialog.offsetWidth) / 2);
   divProgressDialog.style.top = ((document.body.offsetHeight - 
divProgressDialog.offsetHeight) / 2);
}

</SCRIPT>

<INPUT TYPE="BUTTON" VALUE="Click Me!" onclick="startLongProcess();">

<!-- BEGIN PROGRESS DIALOG -->
<DIV STYLE="BORDER: buttonhighlight 2px outset; FONT-SIZE: 8pt; Z-INDEX: 
4; FONT-FAMILY: Tahoma; POSITION: absolute; BACKGROUND-COLOR: buttonface; 
DISPLAY: none; WIDTH: 350px; CURSOR: default" ID="divProgressDialog" 
onselectstart="window.event.returnValue=false;">
   <DIV STYLE="PADDING: 3px; FONT-WEIGHT: bolder; COLOR: captiontext; 
BORDER-BOTTOM: white 2px groove; BACKGROUND-COLOR: activecaption">
      Downloading Requested Document
   </DIV>
   <DIV STYLE="PADDING: 5px">
      Please wait while I download the document you requested.
   </DIV>
   <DIV STYLE="PADDING: 5px">
      This may take several seconds.
   </DIV>
   <DIV STYLE="PADDING: 5px">
         <DIV ID="divProgressOuter" STYLE="BORDER: 1px solid threedshadow; 
WIDTH: 336px; HEIGHT: 15px">
            <DIV ID="divProgressInner" STYLE="COLOR: white; TEXT-ALIGN: 
center; BACKGROUND-COLOR: infobackground; MARGIN: 0px; WIDTH: 0px; HEIGHT: 
13px;"></DIV>
         </DIV>
   </DIV>
   <DIV STYLE="BORDER-TOP: white 2px groove; PADDING-BOTTOM: 5px; PADDING-TOP: 3px; 
BACKGROUND-COLOR: buttonface; TEXT-ALIGN: center">
         <INPUT STYLE="FONT-FAMILY: Tahoma; FONT-SIZE: 8pt" TYPE="button" 
ID="btnCancel" onclick="stopLongProcess();" VALUE="Cancel">
   </DIV>
</DIV>
<!-- END PROGRESS DIALOG -->

<!-- BEGIN FAKE MODAL DIV-->
<DIV ID="divModal"
   STYLE="BACKGROUND-COLOR: white; FILTER: alpha(opacity=75); LEFT: 0px; POSITION:
 absolute; TOP: 0px; Z-INDEX: 3"
   onclick="window.event.cancelBubble=true; window.event.returnValue=false;">
</DIV>
<!-- END FAKE MODAL DIV -->
</body>
</html>

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.