refresh iframe

    技术2022-05-20  49

    code :

    html> <head> <title>hello iframe reload</title> </head> <mce:script language="JavaScript"><!-- function change() { var url="http://www.baidu.com/s?wd="; url += document.getElementById("name_input").value; //append parameter to url document.getElementById("iframe_baidu").src=encodeURI(url); //don't forget encode url } // --></mce:script> <body> <form> <input name="name" id="name_input" type="text"> <input type="button" οnclick="change()" value="change"> <!--regist function --> </form> <iframe id="iframe_baidu" width="100%" height="100%"></iframe> </body> </html>  


    最新回复(0)