if(ul != "" && ul != null){
if (ul !="http")
url = "<input name=Button2 type=button class=unnamed1 onClick=javascript:window.open('/"+ ul +"'); value=★个性页面>";
else
url = "<input name=Button2 type=button class=unnamed1 onClick=javascript:window.open('"+ ul +"'); value=★个性页面>";

}我的意思是如果不输入http://地址,则直接ul 或下面一句

解决方案 »

  1.   

    <div id="div1"></div><script language="javascript">
    var ul;
    var url;
    ul="abc";
    if(ul != "" && ul != null){
    if (ul !="http")
    url = "<input name=Button2 type=button class=unnamed1 onClick=javascript:window.open('/"+ ul +"'); value=★个性页面>";
    else
    url = "<input name=Button2 type=button class=unnamed1 onClick=javascript:window.open('"+ ul +"'); value=★个性页面>";}
    document.all("div1").innerHTML=url;
    </script>
    根据你的想法,修改如上:
    记得把你的Script放在后面,否则他会找不到控件div1
      

  2.   

    不是用javascript   只是判断是否包含http 语句如何写?
      

  3.   

    if(ul != "" && ul != null){ 
    这个就有问题怎么可能同时成立?