new.asp中:
不能用 <script> 方式呀
用 <!-- #include file="news.asp" -->
並且也不可傳參數 style=font20

解决方案 »

  1.   

    用include 不能传递参数,比较麻烦。用<script language="JavaScript" src="news.asp?class=1&listN=7&width=250&style=font20">
    </script>可以的.我现在用这样写
    Response.Write "document.write('<table>');"
    title_str="<tr><td>·<a onmouseover=ShowContent('" & myrs("title") & "');return true onmouseout=CloseDiv();return true href='detail.asp?id=" & myrs("id") & "'>"&myrs("title")&"</a> "
    Response.Write "document.write(" & chr(34) & title_str & chr(34) & ");"
    Response.Write "document.write('</table>');"可以运行,但是有错误提示,提示语句未结束.
      

  2.   

    <html><head>
    <meta http-equiv="Content-Type" content="text/html; charset=gb2312"><SCRIPT LANGUAGE=javascript>
    function moveAtCaret(n)
     {  
      document.thisform.asd .focus(); 
        var rng=document.thisform.asd.createTextRange(); 
        rng.moveStart("character", n); 
        rng.moveEnd("character", -document.thisform.asd.value.length+n); 
        rng.select(); 
    }
    </SCRIPT>
    </head><body>
     <form method="POST" action="" name="thisform">
    <button onclick="moveAtCaret(3)"> moveAtCaret   </button>                                  
      
    <input type=text  name=asd value="12345678">                       
           </form>
    </body>
    </html>
      

  3.   

    asdmusic8(asdmusic8),你写的是什么,好象跟我的问题没有关系.
      

  4.   

    include 是不能傳參數,但你可在調<!#include 的前面定義需要的變量呀
    這樣在news.asp文件中就可直接用的
      

  5.   

    document.write("<TR><TD>")
    document.write("<A mouseover=ShowContent('公告,号买');return true onmouseout=CloseDiv();return true href=www.my.cn target=_blank>公告</A>")
    document.write("</td></tr>")
      

  6.   

    Response.Write "document.write('<table>');"
    title_str="<tr><td>·<a onmouseover=""ShowContent('" & myrs("title") & "');return true"" onmouseout=""CloseDiv();return true"" href='detail.asp?id=" & myrs("id") & "'>"&myrs("title")&"</a> "
    Response.Write "document.write(" & chr(34) & title_str & chr(34) & ");"
    Response.Write "document.write('</table>');"