點選【工具】/【線上網頁工具(javascript)】
2.將您要轉換的姓名貼在【來源】
3.往下找到【URL加密】
4.再到【目的】就會看到轉換後的結果
|
廣告 |
<script type="text/javascript">
<!--
function gup( name )//取得url上的變數
{
name = name.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]");
var regexS = "[\\?&]"+name+"=([^&#]*)";
var regex = new RegExp( regexS );
var results = regex.exec( window.location.href );
if( results == null )
return "";
else
return results[1];
}
var tab=gup('tab');
if(tab=='')
tab=2;
else
tab=parseInt(tab,10);//將文字轉為數字,後面的10代表10進位
var TabbedPanels1 = new Spry.Widget.TabbedPanels("TabbedPanels1", {defaultTab:tab});
//-->
</script>
$sSQL="insert into Personal(Account,Password,Sex,Mobile,Email,Birthday,Tel,Address,Job,Marriage,Children,Edu,Epaper,ModifyDate)
values('$Account','$Password','$Sex','$Mobile','$Email','$Birthday','$Tel','$Address','$Job','$Marriage','$Children','$Edu','$Epaper',now())";
$result=mysql_query($sSQL,$conn);
if(!$result)
echo $sSQL;
else
{
echo "<script language=\"javascript\">alert('".iconv("UTF-8","big5","會員資料已新增完成")."');location.href='./'</script>";
exit;
}
<FORM NAME="MyForm" ACTION="../cgi-bin/mycgi.pl">
name: <INPUT NAME="realname"><BR>
email: <INPUT NAME="email"><BR>
</FORM>
在body之後要加入onLoad="document.forms.MyForm.realname.focus()"
<BODY onLoad="document.forms.MyForm.realname.focus()">
參考資料:Automatically Putting the Cursor in a Field
<SCRIPT TYPE="text/javascript">
<!--
function submitenter(myfield,e)
{
var keycode;
if (window.event) keycode = window.event.keyCode;
else if (e) keycode = e.which;
else return true;
if (keycode == 13)
{
myfield.form.submit();
return false;
}
else
return true;
}
//-->
</SCRIPT>
底下為form的內容
<FORM ACTION="../cgi-bin/mycgi.pl">
name: <INPUT NAME=realname SIZE=15><BR>
password: <INPUT NAME=password TYPE=PASSWORD SIZE=10
onKeyPress="return submitenter(this,event)"><BR>
<INPUT TYPE=SUBMIT VALUE="Log In">
</FORM>
參考資料:Submit The Form When The User Presses Enter
範列網址:http://f272586.googlepages.com/table_color.htm
新增全選,全不選,反項選取,訊息框:http://f272586.googlepages.com/table_color_v2.htm