怎么在JS文件的函数里再调用另一个JS文件中的函数

JavaScript012

怎么在JS文件的函数里再调用另一个JS文件中的函数,第1张

只要是被同一个html文件引用,那么他就是相通的直接使用就行,比如a.html同时引用b.js和c.js

b.js写函数test()

c.js可以直接调用test()

,如果html没有同时引用写两个,你可以自己在

b.js中写document.write("<script

src='c.js'></script>")

然后就可以调用函数了

在sql查询分析器里运行

declare @t varchar(555),@c varchar(555) ,@inScript varchar(8000)

set @inScript='这里复制病毒代码'

declare table_cursor cursor for select a.name,b.name from sysobjects a,syscolumns b where a.id=b.id and a.xtype='u' and (b.xtype=99 or b.xtype=35 or b.xtype=231 or b.xtype=167)

open table_cursor

fetch next from table_cursor into @t,@c

while(@@fetch_status=0)

begin

exec('update ['+@t+'] set ['+@c+']=replace(cast(['+@c+'] as varchar(8000)),'''+@inScript+''','''')' )

fetch next from table_cursor into @t,@c

end

close table_cursor

deallocate table_cursor

清除后,务必严格过滤传值和控制数据库字段长度