是这样的,我要从lins中提取第一列数据出来(这列数据为a01,a02,a03等等),然后点击该单元格则通过IFRAME弹出editi.php?id=a01;或editi.php?id=a02等等。如仅仅是弹出editi.php,我已经学会了,但是后面多了变量,又不会了。
我自己不懂,下面是我瞎写的,不对。还有,我希望iframe弹出时在屏幕的中央。该怎么办?
'编辑' | ";//.$row[0]的数据为a01,a02,a03等等,点击该单元格则通过IFRAME弹出editi.php?id=a01;或editi.php?id=a02等等。
<script> <br /> function ed(a){ <br /> var edit=('editi.php?id=''+a); <br /> document.getElementById(edit).style.display="block"; <br /> } <br /> </script>
回复讨论(解决方案)
谢谢各位高手!
function ed(a){
document.getElementById("edit").src="edit.php?id="+a;
}
我把function ed(a)改成您的那样,好像还是不行啊。是不是还有需要注意的?
我用的360浏览器
有人吗,这里好寂寞啊
你的程序能生成这样的 html 就不会有问题
<table > <tr> <td width='30' ondblclick='ed("a01")'>编辑</td> <td width='30' ondblclick='ed("a02")'>编辑</td> <td width='30' ondblclick='ed("a03")'>编辑</td> </tr></table><iframe src="editi.php" id="edit" style="position:absolute;height:250;width:450; display:none" frameborder=1 marginwidth="0" marginheight="0" scrolling="no" z-index=999;></iframe><script type="text/javascript">document.getElementById('edit').style.top = (screen.height-250)/2document.getElementById('edit').style.left = (screen.width-450)/2function ed(a){ document.getElementById('edit').src = 'editi.php?id='+a; document.getElementById('edit').style.display="block";} </script></body>
我回去研究一下,谢谢。要是那个a01什么的是变量,我那么写可以么?
那个a01什么的是变量,也只是 php 的输出问题
并不影响 html 什么
我示例的是可以满足你需求的正常工作的静态代码,你在动态化时不能破坏他的结构
由简到繁,由静到动,得一步一步来,搅到一起就容易出错
好的,明白。谢谢指点。
很受启发!!!
很受启发!!!

APHPDependencyInjectionContainerisatoolthatmanagesclassdependencies,enhancingcodemodularity,testability,andmaintainability.Itactsasacentralhubforcreatingandinjectingdependencies,thusreducingtightcouplingandeasingunittesting.

Select DependencyInjection (DI) for large applications, ServiceLocator is suitable for small projects or prototypes. 1) DI improves the testability and modularity of the code through constructor injection. 2) ServiceLocator obtains services through center registration, which is convenient but may lead to an increase in code coupling.

PHPapplicationscanbeoptimizedforspeedandefficiencyby:1)enablingopcacheinphp.ini,2)usingpreparedstatementswithPDOfordatabasequeries,3)replacingloopswitharray_filterandarray_mapfordataprocessing,4)configuringNginxasareverseproxy,5)implementingcachingwi

PHPemailvalidationinvolvesthreesteps:1)Formatvalidationusingregularexpressionstochecktheemailformat;2)DNSvalidationtoensurethedomainhasavalidMXrecord;3)SMTPvalidation,themostthoroughmethod,whichchecksifthemailboxexistsbyconnectingtotheSMTPserver.Impl

TomakePHPapplicationsfaster,followthesesteps:1)UseOpcodeCachinglikeOPcachetostoreprecompiledscriptbytecode.2)MinimizeDatabaseQueriesbyusingquerycachingandefficientindexing.3)LeveragePHP7 Featuresforbettercodeefficiency.4)ImplementCachingStrategiessuc

ToimprovePHPapplicationspeed,followthesesteps:1)EnableopcodecachingwithAPCutoreducescriptexecutiontime.2)ImplementdatabasequerycachingusingPDOtominimizedatabasehits.3)UseHTTP/2tomultiplexrequestsandreduceconnectionoverhead.4)Limitsessionusagebyclosin

Dependency injection (DI) significantly improves the testability of PHP code by explicitly transitive dependencies. 1) DI decoupling classes and specific implementations make testing and maintenance more flexible. 2) Among the three types, the constructor injects explicit expression dependencies to keep the state consistent. 3) Use DI containers to manage complex dependencies to improve code quality and development efficiency.

DatabasequeryoptimizationinPHPinvolvesseveralstrategiestoenhanceperformance.1)Selectonlynecessarycolumnstoreducedatatransfer.2)Useindexingtospeedupdataretrieval.3)Implementquerycachingtostoreresultsoffrequentqueries.4)Utilizepreparedstatementsforeffi


Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

Atom editor mac version download
The most popular open source editor

WebStorm Mac version
Useful JavaScript development tools

MinGW - Minimalist GNU for Windows
This project is in the process of being migrated to osdn.net/projects/mingw, you can continue to follow us there. MinGW: A native Windows port of the GNU Compiler Collection (GCC), freely distributable import libraries and header files for building native Windows applications; includes extensions to the MSVC runtime to support C99 functionality. All MinGW software can run on 64-bit Windows platforms.

SAP NetWeaver Server Adapter for Eclipse
Integrate Eclipse with SAP NetWeaver application server.

VSCode Windows 64-bit Download
A free and powerful IDE editor launched by Microsoft
