Home > Web Front-end > HTML Tutorial > 这个问题出在哪?_html/css_WEB-ITnose

这个问题出在哪?_html/css_WEB-ITnose

WBOY
Release: 2016-06-21 09:38:17
Original
808 people have browsed it

<a href="http://www.baidu.com"><img alt=@item.PeriodId src="../../Content/Images/Product/@item.PeriodName+.jpg" width="147"    style="max-width:90%" /></a>
Copy after login

得出的结果为
<a href="http://www.baidu.com"><img alt=12 src="../../Content/Images/Product/兰州学刊+.jpg" width="147"    style="max-width:90%" /></a>
Copy after login

就是多个加号 请问怎么解决谢谢


回复讨论(解决方案)

问题就在这里
@item.PeriodId

楼上可能没注意 我说的错误是图片的连接有问题 那个图片的后缀名前面我用来连接字符串的加号 还在上面

@item.PeriodId

改为:
@item.PeriodId

仍然不对 会变成这种

<a href="http://www.baidu.com"><img alt=12 src="../../Content/Images/Product/兰州学刊+'.jpg'" width="147" 
Copy after login

额 前面也加上
@item.PeriodId

晕死了
@item.PeriodId

还不对

 <a href="http://www.baidu.com"><img alt=12 src="'../../Content/Images/Product/兰州学刊'+'.jpg'" width="147" 
Copy after login

不知道楼上注意到没 @item.PeriodName是个参数

 <a href="http://www.baidu.com"><img alt=12 src="../../Content/Images/Product/兰州学刊"+".jpg'" width="147"    style="max-width:90%" /></a>
Copy after login

都休息了吗 还在被这个问题困扰着

<html><head>  <script type="text/javascript">	var source=function(a,b)	{	  var c=a.concat(b);	  return(c);	}	window.onload=function()	{	  var ex=source("../../Content/Images/Product/@item.PeriodName",".jpg");	  d1.src=ex;	}  </script></head><body><img  id="d1" / alt="这个问题出在哪?_html/css_WEB-ITnose" ></body></html>
Copy after login


试一下吧。。。

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template