ASP FAQs and Answers (3)

Source: Internet
Author: User
1. Picture Display control:
<script language= "JavaScript" >
<!--
var Flag=false;
function DrawImage (IMGD) {
var image=new image ();
IMAGE.SRC=IMGD.SRC;
if (image.width>0 && image.height>0) {
Flag=true;
if (image.width/image.height>= 360/270) {
if (image.width>360) {
imgd.width=360;
imgd.height= (image.height*360)/image.width;
}else{
Imgd.width=image.width;
Imgd.height=image.height;
}
imgd.alt=image.width+ "X" +image.height;
}
else{
if (image.height>270) {
imgd.height=270;
Imgd.width= (image.width*270)/image.height;
}else{
Imgd.width=image.width;
Imgd.height=image.height;
}
imgd.alt=image.width+ "X" +image.height;
}
}
}
-->
</script>
Call Format:
2. Convert doc to HTML with ASP
Doc2html.vbs
'**********************************************************
'
' Call method: Doc2html c:doc2html c:doc2html
' Call method: Doc2html-s C:doc2htmla.doc c:doc2html
'
'**********************************************************
Dim Objword
Dim objdoc
Dim objFSO
Dim strsource
Dim Strtarget
Dim Bbatch
' Get command-line arguments, there are three possible formats: [-S] directory of source files or files to be converted into HTML files
Function Getparams ()
Dim Objarg
If Wscript.Arguments.Count >= 2 Then
If Wscript.Arguments.Item (0) = "s" Or Wscript.Arguments.Item (0) = "-S" Then
strsource = Wscript.Arguments.Item (1)
Strtarget = Wscript.Arguments.Item (2)
Bbatch = False
Else
strsource = Wscript.Arguments.Item (0)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.