PHP / Javascript / HTML问题 [英] PHP/Javascript/HTML problem

查看:81
本文介绍了PHP / Javascript / HTML问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在我的

代码中发生了潜在的PHP / Javascript / HTML冲突,我根本无法解决这个问题 - 一直困扰着我的大脑

小时超过这个,并且没有找到好的解决方案。


我生成的HTML标签必须如下所示:


引用:

< a href = index.php?section = person& action = delete_dept& id = 1

onClick =" return isOKDelete(''你确定要吗?删除部门

\" Phil \"?'')">

其中


$ deptName =''Phil''



$ section =''person''



$ action =''delete_dept''


我无法弄清楚如何编写我的PHP代码以确保HTML

标记看起来像上面的那样示例并在

动态生成的Javascript函数中工作,ALL在同一时间!


帮助赞赏,这个我我的应用程序的showstopper!


Thanx

菲尔


PS:我需要这个交叉发布在希望找到同样的人

熟练使用PHP,因为我无法想出最好的想法,因为我无法做到这一点。

I am having a potential PHP/Javascript/HTML conflict going on in my
code that I simply can''t resolve - been wracking my brain for a good
hour over this one and have come up with no good solution.

My resulting HTML tag MUST look like this:

quote:
<a href=index.php?section=person&action=delete_dept&i d=1
onClick="return isOKDelete(''Are you sure you wish to delete Department
\"Phil\"?'')">
Where

$deptName = ''Phil''
and
$section = ''person''
and
$action = ''delete_dept''

I can''t figure out how to write my PHP code to ensure that that HTML
tag will look like the above example and work in a
dynamically-generated Javascript function, ALL at the very same time!

Help appreciated, this is a showstopper for my app!

Thanx
Phil

PS: I need this cross-posted in the hope of finding someone as equally
skilled in PHP as in Javascript to be able to come up with the best
idea for this as I can''t.

推荐答案

deptName =''Phil''


deptName = ''Phil''
and


部分=''人''


section = ''person''
and


action =''delete_dept''


我无法弄清楚如何编写我的PHP代码以确保HTML

标记看起来像上面的例子并且在

动态生成的Javascript函数中工作,所有在同一时间!


帮助赞赏,这是我的应用程序的showstopper!


Thanx

Phil


PS:我需要这个交叉发布,希望能找到像PHP一样熟练的人,就像在Javascrip中一样为了能够想出最好的想法,我无法做到这一点。
action = ''delete_dept''

I can''t figure out how to write my PHP code to ensure that that HTML
tag will look like the above example and work in a
dynamically-generated Javascript function, ALL at the very same time!

Help appreciated, this is a showstopper for my app!

Thanx
Phil

PS: I need this cross-posted in the hope of finding someone as equally
skilled in PHP as in Javascript to be able to come up with the best
idea for this as I can''t.


这篇关于PHP / Javascript / HTML问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆