เคล็ดลับ ASP และวิธีแก้ปัญหาที่ใช้งานได้จริง
หมายเลขสุ่ม:
<%สุ่ม%>
<%= (int (rnd ()*n) +1)%>
คีย์เวิร์ดบันทึกที่ได้รับเมื่อข้อมูลการสืบค้นจะแสดงเป็นสีแดง:
<%= แทนที่ (rs ("ฟิลด์ x"), searchname, "<fontcolor =#ff0000>" & searchname & "</font>")%>%>
ผ่าน ASP หมายถึงตรวจสอบว่าลูกค้าใช้เอเจนต์หรือไม่
<%ifrequest.serverVariables ("http_x_forwarded_for") <> ""
Response.write "<fontcolor =#ff0000> คุณได้ผ่านพร็อกซีเซิร์ฟเวอร์แล้ว" & _
"IP จริงคือ" & request.serverVariables ("http_x_forwarded_for")
endif
-
กำหนดแหล่งที่มาของหน้าก่อนหน้า
request.serverVariables ("http_referer")
JavaScript: document.referrer
ล้างแคชหน้าโหลดซ้ำ
<%response.exext = 0
Response.expiresabsolute = Now ()-1
Response.addheader "Pragma", "No-Cache"
Response.addheader "Cache-Control", "Private"
Response.CacheControl = "No-cache"
-
แสดงปีและเดือนในเมนูดรอปดาวน์
<selectName = "เลือก">
-
dimm_year
dimm_month
dimm_monthj
dimm_themonth
dimm_ym
form_year = 2000Toyear (วันที่)
m_month = 12
ifm_year = ปี (วันที่) จากนั้น
m_month = เดือน (วันที่)
endif
form_monthj = 1tom_month
IFM_MONTHJ <10 แล้ว
m_themonth = "0" & m_monthj
อื่น
m_themonth = m_monthj
endif
m_ym = m_year & "-" & m_themonth%>
<aptovientValue = "<%= m_ym%>"> <%= m_ym%> </portion>
-
ต่อไป
ถัดไป%>
</เลือก>
ดึงและลบระเบียนที่ซ้ำกันในฐานข้อมูล
conn.execute ("deleetefromtablewhereidnotin (SelectDistinctInctFromTable)")