2012/09/16

autoit smtp mail sender for gmail

無法查看此摘要。請 按這裡查看文章。

foxweb 根據 hostname 出現不同圖檔


PROCEDURE test2
 
alonehtml=.t.
 
crlf=chr(13)+chr(10)
 
br='<br>'
 
 html_out = 'Content-type: text/html'+crlf+crlf ;
  +'<html><body>';
  +'cookie:'+cgi.cookie+br;
  +'cookieLen:'+str(len(cgi.cookie))+br;
  +userid+br;
  +cgi.remotehost+br;
  +'programpath:'+cgi.programpath+br;
  +cgi.querystring
 
 html_out=html_out;
  +'javascript....<br>';
  +[ <script language=javascript> ]+crlf;
  +[  s1=window.location.hostname;]+crlf;
  +[  p1=s1.indexOf('domain.com');]+crlf;
  +[  alert (p1)]+crlf;
  +[  if (p1>0) { alert ('bingo!')]+crlf;
  +[    alert('bingo2!')]+crlf;
  +[    document.write('<img src=http://pexhome.com/img6/pexhometitle.jpg>');]+crlf;
  +[  } ]+crlf;
  +[ </script> ]+crlf
 
 

顯示或隱藏內容


html page element display or hidden


<script type="text/javascript">
function hideshow(which){
if (!document.getElementById)
return
if (which.style.display=="block")
which.style.display="none"
else
which.style.display="block"
}
</script>
<a href="javascript:hideshow(document.getElementById('adiv'))">11111</a><br><br>
<div id="adiv" style="font:24px bold; display: none">111111111</div>
<a href="javascript:hideshow(document.getElementById('adiv2'))">22222 </a><br><br>
<div id="adiv2" style="font:24px bold; display: none">222222222e</div>
<a href="javascript:hideshow(document.getElementById('adiv3'))">33333 </a><br><br>
<div id="adiv3" style="font:24px bold; display: none">3333333333333e</div>

<html>
<head>
<title>ThaiCreate.Com Tutorial</title>
</head>
<body>
<form name="frmMain" action="" method="post">
<script language="JavaScript">
document.onkeydown = chkEvent
function chkEvent(e) {
 var keycode;
 if (window.event) keycode = window.event.keyCode; //*** for IE ***//
 else if (e) keycode = e.which; //*** for Firefox ***//
 if(keycode==13)
 {
  return false;
 }
}
</script>
Textbox 1 <input type="text" name="txt1" value=""> <br>
Textbox 2 <input type="text" name="txt2" value=""> <br>
Textbox 3 <input type="text" name="txt3" value=""><br>
<input type="submit" name="btnSubmit" value="Submit">
</form>
</body>
</html>

<?php /* Disable the enter key */ ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Confirmation Dialogue Boxes</title>
<script type="text/javascript">
//create a function that accepts an input variable (which key was key pressed)
function disableEnterKey(e){
//create a variable to hold the number of the key that was pressed     
var key;
    //if the users browser is internet explorer
    if(window.event){
      
    //store the key code (Key number) of the pressed key
    key = window.event.keyCode;
      
    //otherwise, it is firefox
    } else {
      
    //store the key code (Key number) of the pressed key
    key = e.which;     
    }
      
    //if key 13 is pressed (the enter key)
    if(key == 13){
      
    //do nothing
    return false;
      
    //otherwise
    } else {
      
    //continue as normal (allow the key press for keys other than "enter")
    return true;
    }
      
//and don't forget to close the function    
}
</script>
</head>
<body>
<form>
<!-- Here we have a form field with it's "onKeyPress" event set to call our JavaScript function -->
<input type="text" name="mytext" onKeyPress="return disableEnterKey(event)">
</form>
</body>
</html>
<? /* Tutorial by Marc Firth */ ?>