Try.asp页面里有如下代码:
<script type="text/javascript">
slpdemo.slpStart = function(){
this.init();
this.show();
this.addMedia({
type:'sinatv',
src:'http://abc.com/123',//怎样把“123”换成变量,以Try.asp?aaa=123表示?
ad:{
}
});
this.play(0);
}
</script>现在,我想在Try.asp?aaa=123页面里把src:'http://abc.com/123'中的“123”换成变量aaa,请问代码怎么写?

解决方案 »

  1.   


    <script type="text/javascript"> 
    slpdemo.slpStart = function(){ 
    this.init(); 
    this.show(); 
    this.addMedia({ 
    type:'sinatv', 
    src:'http://abc.com/<%=request("aaa")%>',
    ad:{ 

    }); 
    this.play(0); 

    </script> 
    试下这个
      

  2.   

    http://abc.com/xxx.asp?aaa=123
    xxx.asp取Request("aaa")
      

  3.   

    回复xuhuan2009:因为试了你说的方法不行我才来提问的!可是刚才又试了一下通过了,哈。也许是我开始试的时候写错了什么吧。不管怎样,很高兴结贴!