mysql run
mysql> set session sql_mode='';
mysql> set global sql_mode='';
<%
'====
Function stripTags( strToStrip )
'====
Dim objRegExp
strToStrip = Trim( strToStrip & "" )
If Len( strToStrip ) > 0 Then
Set objRegExp = New RegExp
objRegExp.IgnoreCase = True
objRegExp.Global = True
objRegExp.Pattern= "<[^>]+>"
strToStrip = objRegExp.Replace(strToStrip, "")
Set objRegExp = Nothing
End If
stripTags = strToStrip
End Function
str="<p>Test paragraph.</p><!-- Comment --> <a href='#fragment'>Other text</a>"
response.write stripTags( str )
%>
<%
Dim ObjMail
Set ObjMail=Server.CreateObject("CDO.Message")
ObjMail.From="寄信人的email"
ObjMail.To="收信人的email"
ObjMail.Subject="email主旨"
'ObjMail.TextBody="TEXT 郵件內文"
ObjMail.HtmlBody="HTML 郵件內文"
'ObjMail.AddAttachment Server.MapPath("AAA.RAR")
'如果有附件的話就用上面的方法附加進去
ObjMail.Send
'發送
Set ObjMail=Nothing
Response.Write("發送成功。")
%>
<HTML>
<HEAD>
<SCRIPT>
function storeCaret (textEl) {
if (textEl.createTextRange)
textEl.caretPos = document.selection.createRange().duplicate();
}
function insertAtCaret (textEl, text) {
if (textEl.createTextRange && textEl.caretPos) {
var caretPos = textEl.caretPos;
caretPos.text =
caretPos.text.charAt(caretPos.text.length - 1) == ' ' ?
text + ' ' : text;
}
else
textEl.value = text;
}
</SCRIPT>
</HEAD>
<BODY>
<FORM NAME="aForm">
<TEXTAREA NAME="TextArea1" ROWS="5" COLS="80" WRAP="soft"
ONSELECT= "storeCaret(this);"
ONCLICK= "storeCaret(this);"
ONKEYUP= "storeCaret(this);"
>
請輸入任意內容.
</TEXTAREA>
<BR>
<INPUT TYPE="text" NAME="aText" SIZE="80" VALUE="Mars,加油!">
<BR>
<INPUT TYPE="button" VALUE="插入" ONCLICK="insertAtCaret(this.form.TextArea1, this.form.aText.value);">
</FORM>
</BODY>
</HTML>