开发者

Help Using Javascript Code in a php file

开发者 https://www.devze.com 2023-02-03 23:08 出处:网络
I have the code below in a .php file on my site. I would like to be able to type the link to the .php file in the address bar, and for the php script to run on the current page. How could I do this?

I have the code below in a .php file on my site. I would like to be able to type the link to the .php file in the address bar, and for the php script to run on the current page. How could I do this? PHP File:

<SCRIPT language=JavaScript>
javascript:document.开发者_StackOverflowbody.contentEditable='true'; document.designMode='on';void(0)
</script>


The way you suggest to do it it's not possible, but you can have a "bookmarlet" which is javascript code that you drag and drop to your bookmarks bar, and every time you click on it, it runs a script.

Try it here: http://jsfiddle.net/XtHsP/

0

精彩评论

暂无评论...
验证码 换一张
取 消