㈠ 关于html中图片的相对路径
个人觉得把代码贴上来会比大家在这猜的强~
Ps:一般的话都是在站点文件夹下新建"images"文件夹用来存图片,然后代码就是
<img src="images/xx.jpg" />
㈡ html中图片路径和格式问题
首先,图片不建议你放桌面,因为桌面的物理地址很长,容易出错;
其次,假如你的图片在D盘的images文件下,文件名称为 tupian.jpeg的话用下面的格式。
<img src="file:///D|/images/tupian.jpeg"/>
这个是物理路径,如果是网站的话,用相对路径则为下面的:
<img src="images/tupian.jpeg"/>
这个为html文件和images同一目录的写法
<img src="tupian.jpeg"/>
这个为图片和html文件同一目录的写法
<img src="../images/tupian.jpeg"/>
这种为html所在文件夹和images文件夹处同一目录也是网站的主目录下的写法
第三,你的图片后缀为jpeg的话,代码里也必须写jpeg不能省略为jpg
㈢ html中插入图片的路径怎么找举个例子
html网页图片的路径,可以鼠标右键点击图片,然后点击"检查"或者"审查元素",在控制台找到,下面详细介绍操作方法
1、以这个页面为例网络图片,对一个图片右键,然后检查元素
㈣ HTML中如何连接本地图片
需要准备的材料分别有:电脑、浏览器、html编辑器。
1、首先,打开html编辑器,新建html文件,例如:index.html。
㈤ 利用HTml中的file控件后,如何将图片保存在指定文件夹下
//上传文件
protected void bt_Post_Click(object sender, EventArgs e)
{
string strBaseLocation = Server.MapPath("../EmployeeFile/");
string TruePath = string.Empty;
string Temp1 = string.Empty;
string remarkid = string.Empty;
if (uploadFile.PostedFile.ContentLength != 0)
{
//获得文件全名
string fileName = System.IO.Path.GetFileName(uploadFile.PostedFile.FileName);
//获得扩展名
string rightName = System.IO.Path.GetExtension(fileName);
Random g = new Random();
string rad = g.Next(10000).ToString();
Temp1 = DateTime.Now.Year.ToString() + DateTime.Now.Month.ToString() + DateTime.Now.Day.ToString() + DateTime.Now.Hour.ToString() + DateTime.Now.Minute.ToString() + DateTime.Now.Second.ToString() + DateTime.Now.Millisecond.ToString() + rad;
uploadFile.PostedFile.SaveAs(strBaseLocation + Temp1 + rightName);
TruePath = Temp1 + rightName; //获得随即文件名
if (Request.QueryString["id"] != "0")
{
string sql_sel = "select * from tsmannouncementmanage where id='" + Request.QueryString["id"] + "'";
OleDbDataReader dr = list.GetList(sql_sel);
if (dr.Read())
{
remarkid = dr["ContactFile"].ToString();
}
if (remarkid != "")
{
string sql_update_file = "update tsmmainannouncefile set name='" + fileName + "',newname='" + TruePath + "' where keyfile='" + remarkid + "'";
list.ExeSql(sql_update_file);
this.Page.ClientScript.RegisterStartupScript(this.GetType(), "", "<script>alert('修改成功!');</script>");
}
else
{
string sql_updateorder = "update tsmannouncementmanage set fileid='" + list.GetFormatStr(Number.Text) + "' where id='" + Request.QueryString["id"] + "'";
list.ExeSql(sql_updateorder);
string sql_insert_file = "insert into tsmmainannouncefile (Name,NewName,KeyFile) values ('" + fileName + "','" + TruePath + "','" + list.GetFormatStr(Number.Text) + "')";
list.ExeSql(sql_insert_file);
this.Page.ClientScript.RegisterStartupScript(this.GetType(), "", "<script>alert('上传成功!');</script>");
}
}
else
{
string sql_insert_file = "insert into tsmmainannouncefile (Name,NewName,KeyFile) values ('" + fileName + "','" + TruePath + "','" + list.GetFormatStr(Number.Text) + "')";
list.ExeSql(sql_insert_file);
this.Page.ClientScript.RegisterStartupScript(this.GetType(), "", "<script>alert('上传成功!');</script>");
}
}
else
{
this.Page.ClientScript.RegisterStartupScript(this.GetType(), "", "<script>alert('你还没有选择要上传的附件!');</script>");
}
}
㈥ 怎么在html中导入图片啊图片应该放在哪个文件夹下
你随便放在哪,然后随便点出一个聊天对话框,点击表情,看到右下角有个叫表情管理,有木有!?!点击它!看见左上角有个添加!有木有?!!点击浏览,找到你随便放的那个文件夹,点击确定!可以支持多选,有木有!有木有!!!
㈦ 在HTML文档如何放图片进去
需要准备的材料分别有:电脑、浏览器、html编辑器。
1、首先,打开html编辑器,新建html文件,例如:index.html。